From 90eba1aa65266aebb3234beff3db11d084cc55b3 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Tue, 17 Oct 2006 11:03:20 +0000 Subject: [PATCH] Fix xnet skin when user tries to access a page he has not the right to use. git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@985 839d8a87-29fc-0310-9880-83ba4fa771e5 --- classes/platalpage.php | 3 +++ include/xnet.inc.php | 17 +++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/classes/platalpage.php b/classes/platalpage.php index 1f20ad6..5ececae 100644 --- a/classes/platalpage.php +++ b/classes/platalpage.php @@ -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(); diff --git a/include/xnet.inc.php b/include/xnet.inc.php index 9b8679c..0d38975 100644 --- a/include/xnet.inc.php +++ b/include/xnet.inc.php @@ -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"); + } } // }}} -- 2.1.4