mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 15:33:23 +01:00
remove facility to keep not autoloadable classes in EGroupware session, as there are no such classes anymore
This commit is contained in:
parent
c79f6c3b28
commit
f772bf69cd
@ -55,13 +55,6 @@ class Session
|
||||
*/
|
||||
const EGW_APPSESSION_VAR = 'egw_app_session';
|
||||
|
||||
/**
|
||||
* key of eGW's required files in $_SESSION
|
||||
*
|
||||
* These files get set by Db and Egw class, for classes which get not autoloaded (eg. ADOdb, idots_framework)
|
||||
*/
|
||||
const EGW_REQUIRED_FILES = 'egw_required_files';
|
||||
|
||||
/**
|
||||
* key of eGW's egw_info cached in $_SESSION
|
||||
*/
|
||||
@ -160,13 +153,6 @@ class Session
|
||||
*/
|
||||
private $egw_domains;
|
||||
|
||||
/**
|
||||
* $_SESSION at the time the constructor was called
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $required_files;
|
||||
|
||||
/**
|
||||
* Nummeric code why session creation failed
|
||||
*
|
||||
@ -212,8 +198,6 @@ class Session
|
||||
*/
|
||||
function __construct(array $domain_names=null)
|
||||
{
|
||||
$this->required_files = $_SESSION[self::EGW_REQUIRED_FILES];
|
||||
|
||||
$this->sessionid = self::get_sessionid();
|
||||
$this->kp3 = self::get_request('kp3');
|
||||
|
||||
@ -983,13 +967,6 @@ class Session
|
||||
*/
|
||||
private function register_session($login,$user_ip,$now,$session_flags)
|
||||
{
|
||||
// restore session vars set before session was started
|
||||
if (is_array($this->required_files))
|
||||
{
|
||||
$_SESSION[self::EGW_REQUIRED_FILES] = !is_array($_SESSION[self::EGW_REQUIRED_FILES] ?? null) ? $this->required_files :
|
||||
array_unique(array_merge($_SESSION[self::EGW_REQUIRED_FILES],$this->required_files));
|
||||
unset($this->required_files);
|
||||
}
|
||||
$_SESSION[self::EGW_SESSION_VAR] = array(
|
||||
'session_id' => $this->sessionid,
|
||||
'session_lid' => $login,
|
||||
|
@ -56,7 +56,7 @@ if (Session::init_handler())
|
||||
{
|
||||
if ($GLOBALS['egw_info']['flags']['currentapp'] != 'login' && $GLOBALS['egw_info']['flags']['currentapp'] != 'logout')
|
||||
{
|
||||
if (is_array($_SESSION[Session::EGW_INFO_CACHE]) && $_SESSION[Session::EGW_OBJECT_CACHE] && $_SESSION[Session::EGW_REQUIRED_FILES])
|
||||
if (is_array($_SESSION[Session::EGW_INFO_CACHE]) && !empty($_SESSION[Session::EGW_OBJECT_CACHE]))
|
||||
{
|
||||
// marking the context as restored from the session, used by session->verify to not read the data from the db again
|
||||
$GLOBALS['egw_info']['flags']['restored_from_session'] = true;
|
||||
@ -64,14 +64,6 @@ if (Session::init_handler())
|
||||
// restoring the egw_info-array
|
||||
$GLOBALS['egw_info'] = array_merge($_SESSION[Session::EGW_INFO_CACHE],array('flags' => $GLOBALS['egw_info']['flags']));
|
||||
|
||||
// include required class-definitions
|
||||
if (is_array($_SESSION[Session::EGW_REQUIRED_FILES])) // all classes, which can not be autoloaded
|
||||
{
|
||||
foreach($_SESSION[Session::EGW_REQUIRED_FILES] as $file)
|
||||
{
|
||||
require_once($file);
|
||||
}
|
||||
}
|
||||
$GLOBALS['egw'] = unserialize($_SESSION[Session::EGW_OBJECT_CACHE], ['allowed_classes' => true]);
|
||||
|
||||
if (is_object($GLOBALS['egw']) && ($GLOBALS['egw'] instanceof Egw)) // only egw object has wakeup2, setups egw_minimal eg. has not!
|
||||
@ -86,14 +78,12 @@ if (Session::init_handler())
|
||||
$GLOBALS['egw_info'] = array('flags'=>$GLOBALS['egw_info']['flags']);
|
||||
unset($GLOBALS['egw_info']['flags']['restored_from_session']);
|
||||
unset($_SESSION[Session::EGW_INFO_CACHE]);
|
||||
unset($_SESSION[Session::EGW_REQUIRED_FILES]);
|
||||
unset($_SESSION[Session::EGW_OBJECT_CACHE]);
|
||||
}
|
||||
}
|
||||
else // destroy the session-cache if called by login or logout
|
||||
{
|
||||
unset($_SESSION[Session::EGW_INFO_CACHE]);
|
||||
unset($_SESSION[Session::EGW_REQUIRED_FILES]);
|
||||
unset($_SESSION[Session::EGW_OBJECT_CACHE]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user