mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 17:19:06 +01:00
no longer store ADOdb object in session, also ensures reevaluating environment-data or multiple hosts in connection-data
This commit is contained in:
parent
0e7a5338f0
commit
51b60c5df6
@ -584,6 +584,24 @@ class egw_db
|
||||
$this->connect(); // we need to re-connect
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic method called when object get's serialized
|
||||
*
|
||||
* We do NOT store Link_ID and private_Link_ID, as we need to reconnect anyway.
|
||||
* This also ensures reevaluating environment-data or multiple hosts in connection-data!
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function __sleep()
|
||||
{
|
||||
if (!empty($this->setupType)) $this->Type = $this->setupType; // restore Type eg. to mysqli
|
||||
|
||||
$vars = get_object_vars($this);
|
||||
unset($vars['Link_ID']);
|
||||
unset($vars['privat_Link_ID']);
|
||||
return array_keys($vars);
|
||||
}
|
||||
|
||||
/**
|
||||
* changes defaults set in class-var $capabilities depending on db-type and -version
|
||||
*
|
||||
@ -639,7 +657,7 @@ class egw_db
|
||||
unset($this->Link_ID);
|
||||
$this->Link_ID = 0;
|
||||
|
||||
if (!empty($this->setupType)) $this->type = $this->setupType;
|
||||
if (!empty($this->setupType)) $this->Type = $this->setupType;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user