X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fxnetpage.php;h=f4d8e0033d7255152f0d1e03afe6a9951b9900d0;hb=c96da6c19e1efe2de88ba0e9999129b6e3d1d915;hp=f020535de24129e43223a13402da38b2ef5c3e12;hpb=ea74d2785d9c1ff5571ebf2f73c89cbf19c8dd07;p=platal.git diff --git a/classes/xnetpage.php b/classes/xnetpage.php index f020535..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'); } // }}} @@ -86,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')) { @@ -113,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'); @@ -138,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 = '
Mes groupes (' . $links . ') :
'; while (list($nom, $mini) = $res->next()) {