From d83a1b04f399c65be114718d4301bb7dc1c8a7cc Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Mon, 6 Nov 2006 16:20:08 +0000 Subject: [PATCH] Change default: show menu in xnet pages. git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1053 839d8a87-29fc-0310-9880-83ba4fa771e5 --- include/xnet.inc.php | 2 -- include/xnet/page.inc.php | 5 +++++ modules/xnet.php | 5 +---- modules/xnetlists.php | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/xnet.inc.php b/include/xnet.inc.php index 34ea7dd..854eda3 100644 --- a/include/xnet.inc.php +++ b/include/xnet.inc.php @@ -49,7 +49,6 @@ function new_group_open_page($tpl_name, $refuse_access = false) new_page($tpl_name); - $page->useMenu(); $page->assign('asso', $globals->asso()); $page->setType($globals->asso('cat')); @@ -85,7 +84,6 @@ function new_admin_page($tpl_name) check_perms(); - $page->useMenu(); if ($globals->asso('cat')) { $page->assign('asso', $globals->asso()); $page->setType($globals->asso('cat')); diff --git a/include/xnet/page.inc.php b/include/xnet/page.inc.php index 533ba92..e41a0e0 100644 --- a/include/xnet/page.inc.php +++ b/include/xnet/page.inc.php @@ -21,6 +21,8 @@ class XnetPage extends PlatalPage { + var $nomenu = false; + // {{{ function XnetPage() function XnetPage($tpl, $type=SKINNED) @@ -41,6 +43,9 @@ class XnetPage extends PlatalPage function run() { + if (!$this->nomenu) { + $this->useMenu(); + } $this->_run('xnet/skin.tpl'); } diff --git a/modules/xnet.php b/modules/xnet.php index 5427a27..2b6e9b4 100644 --- a/modules/xnet.php +++ b/modules/xnet.php @@ -37,6 +37,7 @@ class XnetModule extends PLModule function handler_index(&$page) { + $page->nomenu = true; $page->changeTpl('xnet/index.tpl'); } @@ -49,13 +50,11 @@ class XnetModule extends PLModule { XnetSession::destroy(); $page->changeTpl('xnet/deconnexion.tpl'); - $page->useMenu(); } function handler_admin(&$page) { new_admin_page('xnet/admin.tpl'); - $page->useMenu(); if (Get::has('del')) { $res = XDB::query('SELECT id, nom, mail_domain @@ -141,7 +140,6 @@ class XnetModule extends PLModule WHERE FIND_IN_SET("Institutions", cat) ORDER BY diminutif'); $page->assign('inst', $res); - $page->useMenu(); } function handler_groups2(&$page) @@ -179,7 +177,6 @@ class XnetModule extends PLModule $page->assign('gps', $res->fetchAllAssoc()); } - $page->useMenu(); $page->setType($cat); } } diff --git a/modules/xnetlists.php b/modules/xnetlists.php index 23b114f..cbadb49 100644 --- a/modules/xnetlists.php +++ b/modules/xnetlists.php @@ -60,7 +60,6 @@ class XnetListsModule extends ListsModule $this->client = new MMList(S::v('uid'), S::v('password'), $globals->asso('mail_domain')); - $page->useMenu(); $page->assign('asso', $globals->asso()); $page->setType($globals->asso('cat')); -- 2.1.4