mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 15:48:55 +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
ccb65bb2c8
commit
8f6f31dbb3
@ -452,7 +452,12 @@ class egw_db
|
||||
$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
|
||||
$this->halt("ADOdb::$connect($Host, $this->User, \$Password, $this->Database) reconnect failed.");
|
||||
return null; // in case error-reporting = 'no'
|
||||
}
|
||||
|
||||
if ($new_connection)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user