X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fxnetpage.php;h=2a63e16853ce6d43b88c2e00614196ae590eb7ca;hb=1d3648321e2636332b731eb7d3f5b281bcf3aa00;hp=918f122bf6bfc21935dda299283a837d921d4835;hpb=5b2c99878fc75a6acffb2239e284f2cb1782142c;p=platal.git diff --git a/classes/xnetpage.php b/classes/xnetpage.php index 918f122..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'); } @@ -113,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'); @@ -139,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 = '