Removes erroneous line in handlers list.
[platal.git] / modules / lists.php
index 20477a6..688b0b0 100644 (file)
@@ -26,23 +26,23 @@ class ListsModule extends PLModule
     function handlers()
     {
         return array(
-            'lists'              => $this->make_hook('lists',     AUTH_MDP),
+            'lists'              => $this->make_hook('lists',     AUTH_MDP,    'user'),
             'lists/ajax'         => $this->make_hook('ajax',      AUTH_MDP,    'user', NO_AUTH),
             'lists/create'       => $this->make_hook('create',    AUTH_MDP,    'lists'),
 
-            'lists/members'      => $this->make_hook('members',   AUTH_COOKIE),
-            'lists/csv'          => $this->make_hook('csv',       AUTH_COOKIE),
-            'lists/annu'         => $this->make_hook('annu',      AUTH_COOKIE),
-            'lists/archives'     => $this->make_hook('archives',  AUTH_COOKIE),
+            'lists/members'      => $this->make_hook('members',   AUTH_COOKIE, 'user'),
+            'lists/csv'          => $this->make_hook('csv',       AUTH_COOKIE, 'user'),
+            'lists/annu'         => $this->make_hook('annu',      AUTH_COOKIE, 'user'),
+            'lists/archives'     => $this->make_hook('archives',  AUTH_COOKIE, 'user'),
             'lists/archives/rss' => $this->make_hook('rss',       AUTH_PUBLIC, 'user', NO_HTTPS),
 
-            'lists/moderate'     => $this->make_hook('moderate',  AUTH_MDP),
-            'lists/admin'        => $this->make_hook('admin',     AUTH_MDP),
-            'lists/options'      => $this->make_hook('options',   AUTH_MDP),
-            'lists/delete'       => $this->make_hook('delete',    AUTH_MDP),
+            'lists/moderate'     => $this->make_hook('moderate',  AUTH_MDP,    'user'),
+            'lists/admin'        => $this->make_hook('admin',     AUTH_MDP,    'user'),
+            'lists/options'      => $this->make_hook('options',   AUTH_MDP,    'user'),
+            'lists/delete'       => $this->make_hook('delete',    AUTH_MDP,    'user'),
 
-            'lists/soptions'     => $this->make_hook('soptions',  AUTH_MDP),
-            'lists/check'        => $this->make_hook('check',     AUTH_MDP),
+            'lists/soptions'     => $this->make_hook('soptions',  AUTH_MDP,    'user'),
+            'lists/check'        => $this->make_hook('check',     AUTH_MDP,    'user'),
             'admin/lists'        => $this->make_hook('admin_all', AUTH_MDP,    'admin'),
             'admin/aliases'      => $this->make_hook('aaliases',  AUTH_MDP,    'admin')
         );
@@ -348,7 +348,7 @@ class ListsModule extends PLModule
         $list = list_fetch_basic_info(list_extract_members($members[1]));
         pl_cached_content_headers('text/x-csv', 1);
 
-        echo "email,nom,promo\n";
+        echo "nom,promo\n";
         echo implode("\n", $list);
         exit;
     }
@@ -380,29 +380,26 @@ class ListsModule extends PLModule
         list(,$members) = $this->client->get_members($liste);
 
         if ($action == 'moderators') {
-            $members = $owners;
+            $users = $owners;
             $show_moderators = true;
             $action = $subaction;
             $subaction = '';
         } else {
             $show_moderators = false;
-        }
-        $users = array();
-        foreach ($members as $m) {
-            $users[] = $m[1];
+            $users = array();
+            foreach ($members as $m) {
+                $users[] = $m[1];
+            }
         }
 
         require_once 'userset.inc.php';
-        if ($action == 'listmember' || $action == '') {
-            $view = new UserArraySet($users);
-        } else {
-            $view = new ProfileArraySet($users);
-        }
+        $view = new UserArraySet($users);
         $view->addMod('trombi', 'Trombinoscope', false, array('with_promo' => true));
-        $view->addMod('minifiche', 'Mini-fiches', false);
         $view->addMod('listmember', 'Annuaire', true);
-        // TODO: Reactivate when the new map is completed.
-        // $view->addMod('geoloc', 'Planisphère');
+        if (empty($GLOBALS['IS_XNET_SITE'])) {
+            $view->addMod('minifiche', 'Mini-fiches', false);
+        }
+        $view->addMod('map', 'Planisphère');
         $view->apply("lists/annu/$liste", $page, $action, $subaction);
 
         $page->changeTpl('lists/annu.tpl');