Fix xnet skin when user tries to access a page he has not the right to use.
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 17 Oct 2006 11:03:20 +0000 (11:03 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 17 Oct 2006 11:03:20 +0000 (11:03 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@985 839d8a87-29fc-0310-9880-83ba4fa771e5

classes/platalpage.php
include/xnet.inc.php

index 1f20ad6..5ececae 100644 (file)
@@ -154,6 +154,9 @@ class PlatalPage extends Smarty
 
     function kill($msg)
     {
+        global $platal;
+
+        $this->assign('platal', $platal);
         $this->trig($msg);
         $this->_failure = true;
         $this->run();
index 9b8679c..0d38975 100644 (file)
@@ -49,13 +49,13 @@ function new_group_page($tpl_name)
 
     new_page($tpl_name);
 
-    if (!is_member() && !S::has_perms()) {
-        $page->kill("You have not sufficient credentials");
-    }
-
     $page->useMenu();
     $page->assign('asso', $globals->asso());
     $page->setType($globals->asso('cat'));
+
+    if (!is_member() && !S::has_perms()) {
+        $page->kill("Vous n'avez pas les droits suffisants pour accéder à cette page");
+    }
 }
 
 // }}}
@@ -67,13 +67,14 @@ function new_groupadmin_page($tpl_name)
 
     new_page($tpl_name);
 
-    if (!may_update()) {
-        $page->kill("You have not sufficient credentials");
-    }
-
     $page->useMenu();
     $page->assign('asso', $globals->asso());
     $page->setType($globals->asso('cat'));
+
+
+    if (!may_update()) {
+        $page->kill("Vous n'avez pas les droits suffisants pour accéder à cette page");
+    }
 }
 
 // }}}