* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: xorg.globals.inc.php.in,v 1.5 2004-11-23 11:10:41 x2000habouzit Exp $
+ $Id: xorg.globals.inc.php.in,v 1.6 2004-11-23 11:32:34 x2000habouzit Exp $
***************************************************************************/
require_once("diogenes.core.globals.inc.php");
if ($c == 'global') {
global $$key;
$$key = $val;
- } elseif ($c == 'core') {
+ } elseif ($c == 'core' && isset($this->$key)) {
$this->$key=$val;
} else {
$this->$c->$key = $val;
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * 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 $
+ ***************************************************************************/
+
+// {{{ class XorgGlobals
+
+class CoreConfig
+{
+ // {{{ skin
+
+ var $skin_enable = 1;
+ var $skin_id = 1;
+ var $skin_tpl = 'default.tpl';
+
+ // }}}
+}
+
+// }}}
+
+$this->core = new CoreConfig;
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: xorg.inc.php,v 1.3 2004-11-22 21:40:47 x2000habouzit Exp $
+ $Id: xorg.inc.php,v 1.4 2004-11-23 11:32:34 x2000habouzit Exp $
***************************************************************************/
function microtime_float()
define("PERMS_USER", "user");
define("PERMS_ADMIN", "admin");
-define('SKIN_COMPATIBLE','default.tpl');
-define('SKIN_COMPATIBLE_ID',1);
-
define('SKINNED', 0);
define('NO_SKIN', 1);
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: session.inc.php,v 1.3 2004-11-22 20:11:42 x2000habouzit Exp $
+ $Id: session.inc.php,v 1.4 2004-11-23 11:32:34 x2000habouzit Exp $
***************************************************************************/
require_once("diogenes.core.session.inc.php");
function set_skin()
{
global $globals;
- if (logged()) {
+ if (logged() && $globals->core->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'] = SKIN_COMPATIBLE;
- $_SESSION['skin_id'] = SKIN_COMPATIBLE_ID;
+ $_SESSION['skin'] = $globals->core->skin_tpl;
+ $_SESSION['skin_id'] = $globals->core->skin_id;
}
mysql_free_result($result);
- }
-
- if (!logged()) {
- $_SESSION['skin'] = SKIN_COMPATIBLE;
- $_SESSION['skin_id'] = SKIN_COMPATIBLE_ID;
+ } else {
+ $_SESSION['skin'] = $globals->core->skin_tpl;
+ $_SESSION['skin_id'] = $globals->core->skin_id;
}
}