Adds a postal formated address to the addresses data.
[platal.git] / modules / xnetlists.php
index 3c71652..6738601 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -19,7 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once dirname(__FILE__).'/lists.php';
+Platal::load('lists');
 
 class XnetListsModule extends ListsModule
 {
@@ -32,6 +32,7 @@ class XnetListsModule extends ListsModule
             '%grp/lists/create'    => $this->make_hook('create',    AUTH_MDP, 'groupmember'),
 
             '%grp/lists/members'   => $this->make_hook('members',   AUTH_COOKIE),
+            '%grp/lists/csv'       => $this->make_hook('csv',       AUTH_COOKIE),
             '%grp/lists/annu'      => $this->make_hook('annu',      AUTH_COOKIE),
             '%grp/lists/archives'  => $this->make_hook('archives',  AUTH_COOKIE),
             '%grp/lists/archives/rss' => $this->make_hook('rss',    AUTH_PUBLIC),
@@ -56,8 +57,7 @@ class XnetListsModule extends ListsModule
     function prepare_client(&$page)
     {
         global $globals;
-
-        require_once dirname(__FILE__).'/lists/lists.inc.php';
+        Platal::load('lists', 'lists.inc.php');
 
         $this->client = new MMList(S::v('uid'), S::v('password'),
                                    $globals->asso('mail_domain'));
@@ -160,7 +160,7 @@ class XnetListsModule extends ListsModule
         $ret = $this->client->create_list(
                     $liste, utf8_decode(Post::v('desc')), Post::v('advertise'),
                     Post::v('modlevel'), Post::v('inslevel'),
-                    array(S::v('forlife')), array(S::v('forlife')));
+                    array(S::user()->forlifeEmail()), array(S::user()->forlifeEmail()));
 
         $dom = strtolower($globals->asso("mail_domain"));
         $red = $dom.'_'.$liste;