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:
Ralf Becker 2016-06-05 16:59:55 +02:00
parent 1cf91d150c
commit 139ee0dab1
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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