* [FIX] Fixed wrong behaviour when updating custom fields data module

* [FIX] Delete non-existant users in notifications table
* [MOD] Improved error logging
This commit is contained in:
nuxsmin
2018-07-30 12:06:53 +02:00
committed by Rubén D
parent 520b1eebec
commit f6aa24d5c1
54 changed files with 196 additions and 189 deletions

View File

@@ -67,6 +67,7 @@ final class MySQLHandler implements DBStorageInterface
/**
* Devuelve el estado de conexión a la BBDD
*
* OK -> 0
* KO -> 1
*
@@ -130,27 +131,23 @@ final class MySQLHandler implements DBStorageInterface
*/
public function getConnectionUri()
{
$dsn = ['charset=utf8'];
if (empty($this->connectionData->getDbSocket())) {
$dsn = 'mysql:host=' . $this->connectionData->getDbHost();
$dsn[] = 'host=' . $this->connectionData->getDbHost();
if (null !== $this->connectionData->getDbPort()) {
$dsn .= ';port=' . $this->connectionData->getDbPort();
$dsn[] = 'port=' . $this->connectionData->getDbPort();
}
if (null !== $this->connectionData->getDbName()) {
$dsn .= ';dbname=' . $this->connectionData->getDbName();
}
return $dsn . ';charset=utf8';
} else {
$dsn[] = 'unix_socket=' . $this->connectionData->getDbSocket();
}
$dsn = 'mysql:unix_socket=' . $this->connectionData->getDbSocket();
if (!empty($this->connectionData->getDbName())) {
$dsn .= ';dbname=' . $this->connectionData->getDbName();
$dsn[] = 'dbname=' . $this->connectionData->getDbName();
}
return $dsn . ';charset=utf8';
return 'mysql:' . implode(';', $dsn);
}
/**