X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=inline;f=classes%2Fxnetpage.php;h=2a63e16853ce6d43b88c2e00614196ae590eb7ca;hb=c76545c351fae4e2298624ff9ee5bf854dc5a5b6;hp=d59a2ec10ed0c94cd0877696ff19a35cc841b266;hpb=4f247453ac4a734953df893117b72168c60dd22e;p=platal.git diff --git a/classes/xnetpage.php b/classes/xnetpage.php index d59a2ec..2a63e16 100644 --- a/classes/xnetpage.php +++ b/classes/xnetpage.php @@ -1,6 +1,6 @@ assign('is_admin', may_update()); $this->assign('is_member', is_member()); } + $this->addJsLink('jquery.js'); + $this->addJsLink('overlib.js'); + $this->addJsLink('wiki.js'); $this->addJsLink('xorg.js'); $this->setTitle('Les associations polytechniciennes'); } @@ -52,6 +55,8 @@ class XnetPage extends PlPage { if (!$this->nomenu) { $this->useMenu(); + } else { + $this->assign('menu', false); } $this->_run('xnet/skin.tpl'); } @@ -87,7 +92,6 @@ class XnetPage extends PlPage if ($perms->hasFlag('groupannu')) { $sub['annuaire du groupe'] = "$dim/annuaire"; $sub['trombinoscope'] = "$dim/trombi"; - $sub['planisphère'] = "$dim/geoloc"; } if ($perms->hasFlag('groupmember')) { if ($globals->asso('forum')) { @@ -114,12 +118,12 @@ class XnetPage extends PlPage $sub['créer une liste'] = "$dim/lists/create"; $sub['créer un alias'] = "$dim/alias/create"; } - if (S::has_perms()) { + if (S::admin()) { $sub['gérer les groupes'] = array('href' => 'admin', 'style' => 'color: gray;'); $sub['clear cache'] = array('href' => 'purge_cache?token=' . S::v('xsrf_token'), 'style' => 'color: gray;'); } $menu['Administrer'] = $sub; - } elseif (S::has_perms()) { + } elseif (S::admin()) { $sub = array(); $sub['gérer les groupes'] = 'admin'; $sub['clear cache'] = 'purge_cache?token=' . S::v('xsrf_token'); @@ -140,8 +144,8 @@ function list_all_my_groups($params) return; } $res = XDB::iterRow('SELECT a.nom, a.diminutif - FROM groupex.asso AS a - INNER JOIN groupex.membres AS m ON m.asso_id = a.id + FROM groups AS a + INNER JOIN group_members AS m ON m.asso_id = a.id WHERE m.uid = {?}', S::i('uid')); $links = 'déconnexion'; $html = '