Merge branch 'master' of https://github.com/phpmyadmin/phpmyadmin
This commit is contained in:
commit
bd73eb3068
@ -1436,20 +1436,12 @@ class PMA_DatabaseInterface
|
||||
* been established. It sets the connection collation, and determines the
|
||||
* version of MySQL which is running.
|
||||
*
|
||||
* @param mixed $link mysql link resource|object
|
||||
* @param boolean $is_controluser whether link is for control user
|
||||
* @param mixed $link mysql link resource|object
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function postConnect($link, $is_controluser = false)
|
||||
public function postConnect($link)
|
||||
{
|
||||
if ($is_controluser) {
|
||||
/*
|
||||
* FIXME: Not sure if this is right approach, but we can not
|
||||
* define constants multiple time.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
if (! defined('PMA_MYSQL_INT_VERSION')) {
|
||||
if (PMA_Util::cacheExists('PMA_MYSQL_INT_VERSION')) {
|
||||
define(
|
||||
@ -2132,9 +2124,13 @@ class PMA_DatabaseInterface
|
||||
$user, $password, $is_controluser = false, $server = null,
|
||||
$auxiliary_connection = false
|
||||
) {
|
||||
return $this->_extension->connect(
|
||||
$result = $this->_extension->connect(
|
||||
$user, $password, $is_controluser, $server, $auxiliary_connection
|
||||
);
|
||||
if ($result && ! $auxiliary_connection && ! $is_controluser) {
|
||||
$GLOBALS['dbi']->postConnect($link);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -136,7 +136,6 @@ class PMA_DBI_Drizzle implements PMA_DBI_Extension
|
||||
}
|
||||
|
||||
if ($link != false) {
|
||||
$GLOBALS['dbi']->postConnect($link, $is_controluser);
|
||||
return $link;
|
||||
}
|
||||
|
||||
|
||||
@ -175,9 +175,6 @@ class PMA_DBI_Mysql implements PMA_DBI_Extension
|
||||
return false;
|
||||
}
|
||||
} // end if
|
||||
if (! $server) {
|
||||
$GLOBALS['dbi']->postConnect($link, $is_controluser);
|
||||
}
|
||||
return $link;
|
||||
}
|
||||
|
||||
|
||||
@ -229,7 +229,6 @@ class PMA_DBI_Mysqli implements PMA_DBI_Extension
|
||||
}
|
||||
|
||||
if ($return_value != false) {
|
||||
$GLOBALS['dbi']->postConnect($link, $is_controluser);
|
||||
return $link;
|
||||
}
|
||||
|
||||
@ -692,7 +691,7 @@ class PMA_DBI_Mysqli implements PMA_DBI_Extension
|
||||
$charsetnr = $f->charsetnr;
|
||||
$f = $f->flags;
|
||||
$flags = array();
|
||||
foreach ($pma_flag_names as $flag => $name) {
|
||||
foreach ($GLOBALS['pma_flag_names'] as $flag => $name) {
|
||||
if ($f & $flag) {
|
||||
$flags[] = $name;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user