From 8a49da96622bc6f9b3bb2da7eb4d2dad003db9f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 28 Aug 2008 15:27:42 +0000 Subject: [PATCH] Loading of extensions is now done after session has started and before referal id is detected --- inc/mysql-manager.php | 6 +++--- inc/session.php | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 637424ef9d..7d31c307dc 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -395,7 +395,7 @@ function IS_ADMIN($admin="") { global $cacheArray, $_CONFIG; $ret = false; $passCookie = ""; $valPass = ""; - //* DEBUG: */ echo __LINE__."ADMIN:".$admin."
"; + /* DEBUG: */ echo __LINE__."ADMIN:".$admin."
"; // If admin login is not given take current from cookies... if ((empty($admin)) && (isSessionVariableSet('admin_login')) && (isSessionVariableSet('admin_md5'))) { @@ -403,7 +403,7 @@ function IS_ADMIN($admin="") $admin = SQL_ESCAPE(get_session('admin_login')); $passCookie = SQL_ESCAPE(get_session('admin_md5')); } - //* DEBUG: */ echo __LINE__."ADMIN:".$admin."/".$passCookie."
"; + /* DEBUG: */ echo __LINE__."ADMIN:".$admin."/".$passCookie."
"; // Search in array for entry if ((!empty($passCookie)) && (isset($cacheArray['admins']['password'][$admin])) && (!empty($admin))) { @@ -438,7 +438,7 @@ function IS_ADMIN($admin="") } // Return result of comparision - //* DEBUG: */ if (!$ret) echo __LINE__."OK!
"; + /* DEBUG: */ if (!$ret) echo __LINE__."OK!
"; return $ret; } // diff --git a/inc/session.php b/inc/session.php index f3b0271162..6999d8c9d7 100644 --- a/inc/session.php +++ b/inc/session.php @@ -52,6 +52,9 @@ $PHPSESSID = @session_id(); // Store language code in cookie set_session("mx_lang", $mx_lang); +// Load extensions here +require_once(PATH."inc/load_extensions.php"); + // Check if refid is set if ((!empty($_GET['user'])) && ($CLICK == 1) && ($_SERVER['PHP_SELF'] == "click.php")) { // The variable user comes from the click-counter script click.php and we only accept this here @@ -68,7 +71,7 @@ if ((!empty($_GET['user'])) && ($CLICK == 1) && ($_SERVER['PHP_SELF'] == "click. } elseif (isSessionVariableSet('refid')) { // Set session refid als global $GLOBALS['refid'] = bigintval(get_session('refid')); -} elseif (GET_EXT_VERSION("sql_patches") != '') { +} elseif (GET_EXT_VERSION("sql_patches") != "") { // Set default refid as refid in URL $GLOBALS['refid'] = bigintval($_CONFIG['def_refid']); } else { -- 2.39.2