From: Florent Bruneau Date: Sun, 1 Jun 2008 21:38:37 +0000 (+0200) Subject: Should not consider admin pages as special. X-Git-Url: http://git.polytechnique.org/?p=dotclear.git;a=commitdiff_plain;h=9b56dd4ef1dd3970180afa831e8493b8d1e8def2 Should not consider admin pages as special. Signed-off-by: Florent Bruneau --- diff --git a/_admin.php b/_admin.php index 6ab8699..8cbb165 100644 --- a/_admin.php +++ b/_admin.php @@ -1,5 +1,4 @@ settings->get('xorg_blog_type'); $owner = $blog->settings->get('xorg_blog_owner'); $level = $this->xorg_infos['grpauth']; - $rec = $core->getUser($this->userID()); + $rec = $core->getUser($this->user_id); $wasAdmin = $rec->f('user_super'); $isAdmin = $this->xorg_infos['perms'] == 'admin'; if (($wasAdmin && !$isAdmin) || (!$wasAdmin && $isAdmin)) { $cur = new cursor($this->con, 'dc_user'); $cur->user_super = $isAdmin ? '1' : '0'; - $core->updUser($this->userID(), $cur); + $core->updUser($this->user_id, $cur); } if ($_SESSION['xorg-group'] != $owner) { $this->killSession(); @@ -212,7 +212,7 @@ class xorgAuth extends dcAuth { public function userID() { $this->buildFromSession(); - if (!defined('IS_ADMIN_PAGE')) { + if (defined('IS_PUBLIC_PAGE')) { return null; } return parent::userID();