From 41bc12c66dea5efb8cab6d535b50b277b909a1d3 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Sun, 21 Nov 2004 20:56:26 +0000 Subject: [PATCH] get rid of stochaskin atm --- include/xorg.common.inc.php | 4 +--- include/xorg.session.inc.php | 20 ++++++-------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/include/xorg.common.inc.php b/include/xorg.common.inc.php index 71b3f78..e1ef91a 100644 --- a/include/xorg.common.inc.php +++ b/include/xorg.common.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: xorg.common.inc.php,v 1.5 2004-08-31 11:16:48 x2000habouzit Exp $ + $Id: xorg.common.inc.php,v 1.6 2004-11-21 20:56:26 x2000habouzit Exp $ ***************************************************************************/ $i=0; @@ -26,13 +26,11 @@ define("AUTH_PUBLIC", $i++); define("AUTH_COOKIE", $i++); define("AUTH_MDP", $i++); -define("PERMS_EXT", "ext"); define("PERMS_USER", "user"); define("PERMS_ADMIN", "admin"); define('SKIN_COMPATIBLE','default.tpl'); define('SKIN_COMPATIBLE_ID',1); -define('SKIN_STOCHASKIN_ID','254'); define('SKINNED', 0); define('NO_SKIN', 1); diff --git a/include/xorg.session.inc.php b/include/xorg.session.inc.php index 5498413..9a63ff6 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: xorg.session.inc.php,v 1.40 2004-11-18 10:40:31 x2000habouzit Exp $ + $Id: xorg.session.inc.php,v 1.41 2004-11-21 20:56:26 x2000habouzit Exp $ ***************************************************************************/ require("diogenes.core.session.inc.php"); @@ -275,30 +275,22 @@ function start_connexion ($uid, $identified) { set_skin(); } -function set_skin() { +function set_skin() +{ global $globals; - if(logged()) { + if (logged()) { $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)) { - if ($_SESSION['skin_id'] == SKIN_STOCHASKIN_ID) { - $res = $globals->db->query("SELECT id,skin FROM skins - WHERE !FIND_IN_SET('cachee',type) order by rand() limit 1"); - list($_SESSION['skin_id'], $_SESSION['skin']) = mysql_fetch_row($res); - mysql_free_result($res); - } - } else { + if (!(list($_SESSION['skin_id'], $_SESSION['skin']) = mysql_fetch_row($result))) { $_SESSION['skin'] = SKIN_COMPATIBLE; $_SESSION['skin_id'] = SKIN_COMPATIBLE_ID; } mysql_free_result($result); } - if( !logged() || !isset($_SERVER['HTTP_USER_AGENT']) - || ereg("Mozilla/4\.[0-9]{1,2} \[",$_SERVER['HTTP_USER_AGENT']) ) - { + if (!logged()) { $_SESSION['skin'] = SKIN_COMPATIBLE; $_SESSION['skin_id'] = SKIN_COMPATIBLE_ID; } -- 2.1.4