Change default: show menu in xnet pages.
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 6 Nov 2006 16:20:08 +0000 (16:20 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 6 Nov 2006 16:20:08 +0000 (16:20 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1053 839d8a87-29fc-0310-9880-83ba4fa771e5

include/xnet.inc.php
include/xnet/page.inc.php
modules/xnet.php
modules/xnetlists.php

index 34ea7dd..854eda3 100644 (file)
@@ -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'));
index 533ba92..e41a0e0 100644 (file)
@@ -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');
     }
 
index 5427a27..2b6e9b4 100644 (file)
@@ -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);
     }
 }
index 23b114f..cbadb49 100644 (file)
@@ -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'));