X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=inline;f=classes%2Fxnetpage.php;h=2a63e16853ce6d43b88c2e00614196ae590eb7ca;hb=c76545c351fae4e2298624ff9ee5bf854dc5a5b6;hp=1fce8e4abc73eac69b71a4834baf231c539d2c74;hpb=de08a5eb35a0daa5ea1817532f02367e0f0edbec;p=platal.git diff --git a/classes/xnetpage.php b/classes/xnetpage.php index 1fce8e4..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'); } // }}} @@ -50,6 +55,8 @@ class XnetPage extends PlPage { if (!$this->nomenu) { $this->useMenu(); + } else { + $this->assign('menu', false); } $this->_run('xnet/skin.tpl'); } @@ -72,9 +79,9 @@ class XnetPage extends PlPage $menu = array(); $sub = array(); - $sub['liste des groupes'] = 'plan'; + $sub['tous les groupes'] = 'plan'; $sub['documentation'] = 'Xnet'; - $sub['signaler un bug'] = array('href' => 'send_bug', 'class' => 'popup_840x600'); + $sub['signaler un bug'] = array('href' => 'send_bug/'.$_SERVER['REQUEST_URI'], 'class' => 'popup_840x600'); $menu["no_title"] = $sub; $perms = S::v('perms'); @@ -85,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')) { @@ -112,15 +118,15 @@ 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', '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'; + $sub['clear cache'] = 'purge_cache?token=' . S::v('xsrf_token'); $menu['Administrer'] = $sub; } @@ -137,11 +143,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 = '