Visitar URL original
Merge pull request #18014 from MauricioFauth/connection-dbal · phpmyadmin/phpmyadmin@e2bda4f · GitHub
Skip to content

Commit e2bda4f

Browse files
Merge pull request #18014 from MauricioFauth/connection-dbal
Create Dbal\Connection class
2 parents 591bc50 + a6bdf8a commit e2bda4f

12 files changed

Lines changed: 288 additions & 491 deletions

‎libraries/classes/Common.php‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,19 +609,18 @@ private static function connectToDatabaseServer(DatabaseInterface $dbi, Authenti
609609
* Try to connect MySQL with the control user profile (will be used to get the privileges list for the current
610610
* user but the true user link must be open after this one so it would be default one for all the scripts).
611611
*/
612-
$controlLink = false;
612+
$controlConnection = null;
613613
if ($GLOBALS['cfg']['Server']['controluser'] !== '') {
614-
$controlLink = $dbi->connect(DatabaseInterface::CONNECT_CONTROL);
614+
$controlConnection = $dbi->connect(DatabaseInterface::CONNECT_CONTROL);
615615
}
616616

617617
// Connects to the server (validates user's login)
618-
$userLink = $dbi->connect(DatabaseInterface::CONNECT_USER);
619-
620-
if ($userLink === false) {
618+
$userConnection = $dbi->connect(DatabaseInterface::CONNECT_USER);
619+
if ($userConnection === null) {
621620
$auth->showFailure('mysql-denied');
622621
}
623622

624-
if ($controlLink) {
623+
if ($controlConnection !== null) {
625624
return;
626625
}
627626

0 commit comments

Comments
 (0)