X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnet.php;h=2b6e9b46a3a2106f45cdfc5f2034fb13efafc70f;hb=d83a1b04f399c65be114718d4301bb7dc1c8a7cc;hp=fc4536599be10dd382662509972477dc1df9df50;hpb=9053ac09eebb5eedf230ce6ec16033879d3cfa74;p=platal.git diff --git a/modules/xnet.php b/modules/xnet.php index fc45365..2b6e9b4 100644 --- a/modules/xnet.php +++ b/modules/xnet.php @@ -25,6 +25,7 @@ class XnetModule extends PLModule { return array( 'index' => $this->make_hook('index', AUTH_PUBLIC), + 'login' => $this->make_hook('login', AUTH_MDP), 'exit' => $this->make_hook('exit', AUTH_PUBLIC), 'admin' => $this->make_hook('admin', AUTH_MDP, 'admin'), @@ -36,20 +37,24 @@ class XnetModule extends PLModule function handler_index(&$page) { + $page->nomenu = true; $page->changeTpl('xnet/index.tpl'); } + function handler_login(&$page) + { + pl_redirect(''); + } + function handler_exit(&$page) { XnetSession::destroy(); $page->changeTpl('xnet/deconnexion.tpl'); - $page->useMenu(); } function handler_admin(&$page) { new_admin_page('xnet/admin.tpl'); - $page->useMenu(); if (Get::has('del')) { $res = XDB::query('SELECT id, nom, mail_domain @@ -68,11 +73,10 @@ class XnetModule extends PLModule WHERE alias LIKE {?}', '%@'.$domain); $page->trig('suppression des alias mails'); - require_once('lists.inc.php'); - $client =& lists_xmlrpc(S::v('uid'), S::v('password'), $domain); - if ($listes = $client->get_lists()) { + $mmlist = new MMList(S::v('uid'), S::v('password'), $domain); + if ($listes = $mmlist->get_lists()) { foreach ($listes as $l) { - $client->delete_list($l['list'], true); + $mmlist->delete_list($l['list'], true); } $page->trig('mail lists surpprimées'); } @@ -136,7 +140,6 @@ class XnetModule extends PLModule WHERE FIND_IN_SET("Institutions", cat) ORDER BY diminutif'); $page->assign('inst', $res); - $page->useMenu(); } function handler_groups2(&$page) @@ -174,7 +177,6 @@ class XnetModule extends PLModule $page->assign('gps', $res->fetchAllAssoc()); } - $page->useMenu(); $page->setType($cat); } }