Index: trunk/admin/reviews.php
===================================================================
diff -u -r2853 -r3021
--- trunk/admin/reviews.php (.../reviews.php) (revision 2853)
+++ trunk/admin/reviews.php (.../reviews.php) (revision 3021)
@@ -314,8 +314,6 @@
}
SetVariable("HasChanges", 0);
-int_footer();
-$application->Done();
+ $objSession->SetVariable("HasChanges", 0);
+ int_footer();
?>
\ No newline at end of file
Index: trunk/core/kernel/session/session.php
===================================================================
diff -u -r3012 -r3021
--- trunk/core/kernel/session/session.php (.../session.php) (revision 3012)
+++ trunk/core/kernel/session/session.php (.../session.php) (revision 3021)
@@ -560,7 +560,7 @@
$this->CookieSecure
);
- $_COOKIE['sid'] = $this->SID; // for compatibility with in-portal
+ $_COOKIE[$this->CookieName] = $this->SID; // for compatibility with in-portal
}
/**
@@ -645,6 +645,7 @@
$this->StoreVar('last_template', $last_template);
}
$this->StoreVar('last_env', substr($this->Application->BuildEnv($this->Application->GetVar('t'),Array('pass'=>'all')), strlen(ENV_VAR_NAME)+1 ));
+
$this->PrintSession('after save');
$this->Storage->SaveData($this);
}
Index: trunk/core/units/general/inp_ses_storage.php
===================================================================
diff -u -r2946 -r3021
--- trunk/core/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 2946)
+++ trunk/core/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 3021)
@@ -23,6 +23,7 @@
if ($ses_mode == 0) $mode = smGET_ONLY;
if ( defined('ADMIN') && ADMIN ) $mode = smAUTO;
$this->SetMode($mode);
+ $this->SetCookieName( $this->Application->ConfigValue('SessionCookieName') );
$this->SetCookieDomain(SERVER_NAME);
parent::Init($prefix,$special);
Index: trunk/globals.php
===================================================================
diff -u -r2960 -r3021
--- trunk/globals.php (.../globals.php) (revision 2960)
+++ trunk/globals.php (.../globals.php) (revision 3021)
@@ -1413,10 +1413,9 @@
if( !is_object($objSession) ) // when changing pages session doesn't exist -> InPortal BUG
{
global $var_list, $SessionQueryString, $FrontEnd;
- //if(!$var_list["sid"]) $var_list["sid"] = $_COOKIE["sid"];
$objSession = new clsUserSession($var_list["sid"],($SessionQueryString && $FrontEnd==1));
}
- //echo "SID_RESET: ".$GLOBALS['var_list']["sid"].'(COOKIE_SID: '.$_COOKIE["sid"].')
';
+
$last_cat = $objSession->GetVariable('last_category');
$prev_cat = $objSession->GetVariable('prev_category');
//echo "Resetting Page [$prev_cat] -> [$last_cat]
";
@@ -1907,7 +1906,7 @@
if(!$condition) return false;
global $objSession, $adminURL;
- if( !headers_sent() ) set_cookie('sid', ' ', time() - 3600);
+ if( !headers_sent() ) set_cookie(SESSION_COOKIE_NAME, ' ', time() - 3600);
$objSession->Logout();
if($pass_env) $redirect_params = 'env='.BuildEnv().'&'.$redirect_params;
Index: trunk/kernel/parser.php
===================================================================
diff -u -r2957 -r3021
--- trunk/kernel/parser.php (.../parser.php) (revision 2957)
+++ trunk/kernel/parser.php (.../parser.php) (revision 3021)
@@ -1546,7 +1546,7 @@
// save current & previous category (used in pagination)
global $objSession, $objCatList;
global $var_list;
- //echo "SID_INIT: ".$var_list["sid"].'(COOKIE_SID: '.$_COOKIE["sid"].')
';
+
$objSession->SetVariable('prev_category', $objSession->GetVariable('last_category') );
$objSession->SetVariable('last_category', $objCatList->CurrentCategoryID() );
Index: trunk/admin/advanced_view.php
===================================================================
diff -u -r2853 -r3021
--- trunk/admin/advanced_view.php (.../advanced_view.php) (revision 2853)
+++ trunk/admin/advanced_view.php (.../advanced_view.php) (revision 3021)
@@ -313,8 +313,6 @@
}
SetVariable("HasChanges", 0);
-int_footer();
-$application->Done();
+ $objSession->SetVariable("HasChanges", 0);
+ int_footer();
?>
\ No newline at end of file
Index: trunk/admin/index.php
===================================================================
diff -u -r2853 -r3021
--- trunk/admin/index.php (.../index.php) (revision 2853)
+++ trunk/admin/index.php (.../index.php) (revision 3021)
@@ -100,7 +100,7 @@
if (!admin_login() || GetVar('logout') || GetVar('expired') )
{
- if( !headers_sent() ) set_cookie('sid', '', time() - 3600);
+ if( !headers_sent() ) set_cookie(SESSION_COOKIE_NAME, '', time() - 3600);
$objSession->Logout();
require_once($pathtoroot.$admin.'/login.php');
}
Index: trunk/admin/browse.php
===================================================================
diff -u -r2853 -r3021
--- trunk/admin/browse.php (.../browse.php) (revision 2853)
+++ trunk/admin/browse.php (.../browse.php) (revision 3021)
@@ -432,11 +432,7 @@
}
- SetVariable("HasChanges", 0);
- int_footer();
-
- $application->Done();
-
- ?>
\ No newline at end of file
+SetVariable("HasChanges", 0);
+ int_footer();
+?>
\ No newline at end of file
Index: trunk/kernel/include/modules.php
===================================================================
diff -u -r2960 -r3021
--- trunk/kernel/include/modules.php (.../modules.php) (revision 2960)
+++ trunk/kernel/include/modules.php (.../modules.php) (revision 3021)
@@ -3,6 +3,10 @@
Copyright 2002, Intechnic Corporation, All rights reserved
*/
+$ado =& GetADODBConnection();
+$session_cookie_name = $ado->GetOne('SELECT VariableValue FROM '.$g_TablePrefix.'ConfigurationValues WHERE VariableName = "SessionCookieName"');
+define('SESSION_COOKIE_NAME', $session_cookie_name);
+
set_cookie('cookies_on', '1', time() + 31104000);
// if branches that uses if($mod_prefix) or like that will never be executed
@@ -77,7 +81,7 @@
if(!strlen($sid) || $sid=="_")
{
if($sid != "_")
- $sid = $_COOKIE["sid"];
+ $sid = $_COOKIE[SESSION_COOKIE_NAME];
}
else
$SessionQueryString = TRUE;
@@ -396,8 +400,8 @@
{
global $var_list, $objConfig;
- if((!$_COOKIE["sid"] && $objConfig->Get("CookieSessions")>0 && strlen($var_list["sid"])<2 && !headers_sent())
- || strlen($_COOKIE["sid"])>0)
+ if((!$_COOKIE[SESSION_COOKIE_NAME] && $objConfig->Get("CookieSessions")>0 && strlen($var_list["sid"])<2 && !headers_sent())
+ || strlen($_COOKIE[SESSION_COOKIE_NAME]) > 0)
{
return TRUE;
}
@@ -816,7 +820,7 @@
else
{
/* switch user to GET session var */
- if (!$_COOKIE['sid']) {
+ if (!$_COOKIE[SESSION_COOKIE_NAME]) {
$SessionQueryString = TRUE;
}
//else {
@@ -844,7 +848,7 @@
$var_list['t'] = '';
$var_list['sid'] = '';
set_cookie('login', '', time() - 3600);
- set_cookie('sid', '', time() - 3600);
+ set_cookie(SESSION_COOKIE_NAME, '', time() - 3600);
}
$CookieTest = isset($_COOKIE['cookies_on']) ? $_COOKIE['cookies_on'] : '';
@@ -883,7 +887,7 @@
$objSession->SetThemeName($m_var_list["theme"]);
if($objConfig->Get("CookieSessions")>0 && !$SessionQueryString && !headers_sent())
{
- set_cookie('sid', $var_list['sid'], 0);
+ set_cookie(SESSION_COOKIE_NAME, $var_list['sid'], 0);
}
//echo "New Session: ".$objSession->GetSessionKey()."
\n";
if(isset($_COOKIE["login"]) && $Action != "m_logout" && $FrontEnd==1)
Index: trunk/admin/subitems.php
===================================================================
diff -u -r2604 -r3021
--- trunk/admin/subitems.php (.../subitems.php) (revision 2604)
+++ trunk/admin/subitems.php (.../subitems.php) (revision 3021)
@@ -127,7 +127,4 @@
-Done();
-?>
\ No newline at end of file
+
\ No newline at end of file
Index: trunk/kernel/units/general/inp_ses_storage.php
===================================================================
diff -u -r2946 -r3021
--- trunk/kernel/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 2946)
+++ trunk/kernel/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 3021)
@@ -23,6 +23,7 @@
if ($ses_mode == 0) $mode = smGET_ONLY;
if ( defined('ADMIN') && ADMIN ) $mode = smAUTO;
$this->SetMode($mode);
+ $this->SetCookieName( $this->Application->ConfigValue('SessionCookieName') );
$this->SetCookieDomain(SERVER_NAME);
parent::Init($prefix,$special);