From f24f10299845250510248593fc5f0191196b2bba Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Tue, 23 Nov 2004 11:38:44 +0000 Subject: [PATCH] much better like that --- include/xorg.globals/{core.inc.php => skin.inc.php} | 18 +++++++----------- include/xorg/session.inc.php | 12 ++++++------ 2 files changed, 13 insertions(+), 17 deletions(-) rename include/xorg.globals/{core.inc.php => skin.inc.php} (86%) diff --git a/include/xorg.globals/core.inc.php b/include/xorg.globals/skin.inc.php similarity index 86% rename from include/xorg.globals/core.inc.php rename to include/xorg.globals/skin.inc.php index 5714ffd..4a69407 100644 --- a/include/xorg.globals/core.inc.php +++ b/include/xorg.globals/skin.inc.php @@ -18,25 +18,21 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: core.inc.php,v 1.1 2004-11-23 11:32:35 x2000habouzit Exp $ + $Id: skin.inc.php,v 1.1 2004-11-23 11:38:45 x2000habouzit Exp $ ***************************************************************************/ -// {{{ class XorgGlobals +// {{{ class SkinConfig -class CoreConfig +class SkinConfig { - // {{{ skin - - var $skin_enable = 1; - var $skin_id = 1; - var $skin_tpl = 'default.tpl'; - - // }}} + var $enable = 1; + var $def_id = 1; + var $def_tpl = 'default.tpl'; } // }}} -$this->core = new CoreConfig; +$this->skin = new SkinConfig; // vim:set et sw=4 sts=4 sws=4 foldmethod=marker: ?> diff --git a/include/xorg/session.inc.php b/include/xorg/session.inc.php index e966cc3..5dadc48 100644 --- a/include/xorg/session.inc.php +++ b/include/xorg/session.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: session.inc.php,v 1.4 2004-11-23 11:32:34 x2000habouzit Exp $ + $Id: session.inc.php,v 1.5 2004-11-23 11:38:44 x2000habouzit Exp $ ***************************************************************************/ require_once("diogenes.core.session.inc.php"); @@ -340,19 +340,19 @@ function start_connexion ($uid, $identified) function set_skin() { global $globals; - if (logged() && $globals->core->skin_enable) { + if (logged() && $globals->skin->enable) { $result = $globals->db->query("SELECT skin,skin_tpl FROM auth_user_quick AS a INNER JOIN skins AS s ON a.skin=s.id WHERE user_id='{$_SESSION['uid']}' AND skin_tpl != ''"); if (!(list($_SESSION['skin_id'], $_SESSION['skin']) = mysql_fetch_row($result))) { - $_SESSION['skin'] = $globals->core->skin_tpl; - $_SESSION['skin_id'] = $globals->core->skin_id; + $_SESSION['skin'] = $globals->skin->def_tpl; + $_SESSION['skin_id'] = $globals->skin->def_id; } mysql_free_result($result); } else { - $_SESSION['skin'] = $globals->core->skin_tpl; - $_SESSION['skin_id'] = $globals->core->skin_id; + $_SESSION['skin'] = $globals->skin->def_tpl; + $_SESSION['skin_id'] = $globals->skin->def_id; } } -- 2.1.4