mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 03:13:40 +01:00
* API: if re-connect to database fails for an existing session, stop execution with an exception, as otherwise eg. preferences can get lost
This commit is contained in:
parent
025c6a4c22
commit
78efd4a604
@ -450,7 +450,11 @@ class egw_db
|
|||||||
$this->Link_ID =& $GLOBALS['egw']->ADOdb;
|
$this->Link_ID =& $GLOBALS['egw']->ADOdb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$this->Link_ID->isConnected()) $this->Link_ID->Connect();
|
if (!$this->Link_ID->isConnected() && !$this->Link_ID->Connect())
|
||||||
|
{
|
||||||
|
$Host = preg_replace('/password=[^ ]+/','password=$Password',$this->Host); // eg. postgres dsn contains password
|
||||||
|
throw new egw_exception_db_connection("ADOdb::$connect($Host, $this->User, \$Password, $this->Database) reconnect failed.");
|
||||||
|
}
|
||||||
|
|
||||||
if ($new_connection)
|
if ($new_connection)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user