From 0aa378b7657155a64a41466ba2f4705ee0cd8792 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Wed, 28 Jan 2004 11:25:16 +0000 Subject: [PATCH] =?utf8?q?fonction=20de=20cache=20qui=20cr=E9e=20une=20arb?= =?utf8?q?orescence=20de=20cache=20'human=20readable'?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- include/xorg.page.inc.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/include/xorg.page.inc.php b/include/xorg.page.inc.php index 27195e0..5cb64e1 100644 --- a/include/xorg.page.inc.php +++ b/include/xorg.page.inc.php @@ -38,7 +38,7 @@ class XorgPage extends DiogenesCorePage { } function display($append_to_id="") { - $id = $this->make_id() . ($append_to_id ? "-$append_to_id" : ""); + $id = $this->make_id($append_to_id); if($this->_page_type == POPUP) parent::display('skin/'.$_SESSION['skin_popup'], $id); else @@ -46,10 +46,17 @@ class XorgPage extends DiogenesCorePage { exit; } - function make_id() { - $auth = (empty($_SESSION['auth']) ? 0 : $_SESSION['auth']); - $perms = (empty($_SESSION['perms']) ? 0 : $_SESSION['perms']); - return $this->_tpl."-$auth-$perms"; + function make_id($append_to_id="") { + $ret = str_replace('/','|',$this->_tpl); + if($append_to_id) + $ret.="|$append_to_id"; + + $auth_trans = Array(AUTH_PUBLIC => 'public', AUTH_COOKIE => 'cookie', AUTH_MDP => 'passwd'); + $ret .= '|A_'.$auth_trans[empty($_SESSION['auth']) ? AUTH_PUBLIC : $_SESSION['auth']]; + + $ret .= '-'.(empty($_SESSION['perms']) ? PERMS_EXT : $_SESSION['perms']); + + return $ret; } function doAuth() { } -- 2.1.4