much better like that
authorx2000habouzit <x2000habouzit>
Tue, 23 Nov 2004 11:38:44 +0000 (11:38 +0000)
committerx2000habouzit <x2000habouzit>
Tue, 23 Nov 2004 11:38:44 +0000 (11:38 +0000)
include/xorg.globals/skin.inc.php [moved from include/xorg.globals/core.inc.php with 86% similarity]
include/xorg/session.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 (file)
  *  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:
 ?>
index e966cc3..5dadc48 100644 (file)
@@ -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;
     }
   
 }