X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fxnetpage.php;h=f4d8e0033d7255152f0d1e03afe6a9951b9900d0;hb=28c20b86be8b40cecba0d83080879f81c49e07ad;hp=50d86bb715d5d26f34835f25520cc03f2029cee6;hpb=e85e121558a37e06cbf2099843588a6e5e5c267a;p=platal.git diff --git a/classes/xnetpage.php b/classes/xnetpage.php index 50d86bb..f4d8e00 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'); } @@ -87,7 +90,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 +116,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,11 +141,10 @@ function list_all_my_groups($params) if (!S::logged()) { 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 - WHERE m.uid={?}", S::v('uid')); + $res = XDB::iterRow('SELECT a.nom, a.diminutif + 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 = '