mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
no need to log connection retries and final connection failures are always thrown, fixes 5 connection failures log for creating new databases
This commit is contained in:
parent
1cf91d150c
commit
139ee0dab1
@ -298,7 +298,7 @@ class Db
|
||||
* @throws Db\Exception\Connection
|
||||
* @return ADOConnection
|
||||
*/
|
||||
function connect($Database = NULL, $Host = NULL, $Port = NULL, $User = NULL, $Password = NULL,$Type = NULL)
|
||||
function connect($Database = NULL, $Host = NULL, $Port = NULL, $User = NULL, $Password = NULL, $Type = NULL)
|
||||
{
|
||||
/* Handle defaults */
|
||||
if (!is_null($Database) && $Database)
|
||||
@ -347,7 +347,7 @@ class Db
|
||||
return $this->Link_ID;
|
||||
}
|
||||
catch(Db\Exception\Connection $e) {
|
||||
_egw_log_exception($e);
|
||||
//_egw_log_exception($e);
|
||||
$this->disconnect(); // force a new connect
|
||||
$this->Type = $this->setupType; // get set to "mysql" for "mysqli"
|
||||
$use_host_from_session = false; // re-try with next host from list
|
||||
|
@ -184,7 +184,7 @@ class setup_cmd_database extends setup_cmd
|
||||
substr(str_replace(array('.', '-'), '_', $this->db_name),0,self::MAX_DB_NAME_LEN);
|
||||
}
|
||||
try {
|
||||
$msg = @$this->connect();
|
||||
$msg = $this->connect();
|
||||
}
|
||||
catch (Api\Exception\WrongUserinput $e) {
|
||||
// db or user not working --> connect as root and create it
|
||||
|
Loading…
Reference in New Issue
Block a user