Merge #15681 - Fix #15608 DisableIS is broken on pma 4.9.2 with controluser configured

Fixes: #15608
Pull-request: #15681
Ref: 2bc8afea5f
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2019-12-21 21:30:22 +01:00
commit f402a8f2cf
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
2 changed files with 9 additions and 7 deletions

View File

@ -2330,11 +2330,7 @@ class DatabaseInterface
{
if (count($this->_current_user) == 0) {
$user = $this->getCurrentUser();
if ($user === '@') {// Request did not succeed, please do not cache
return ['', ''];
} else {
$this->_current_user = explode("@", $user);
}
$this->_current_user = explode("@", $user);
}
return $this->_current_user;
}
@ -2517,8 +2513,6 @@ class DatabaseInterface
/* Run post connect for user connections */
if ($target == DatabaseInterface::CONNECT_USER) {
$this->postConnect();
} elseif ($target == DatabaseInterface::CONNECT_CONTROL) {
$this->postConnectControl();
}
return $result;
}

View File

@ -458,3 +458,11 @@ $GLOBALS['PMA_Config']->loadUserPreferences();
/* Tell tracker that it can actually work */
Tracker::enable();
if (! defined('PMA_MINIMUM_COMMON')
&& ! empty($GLOBALS['server'])
&& isset($GLOBALS['cfg']['ZeroConf'])
&& $GLOBALS['cfg']['ZeroConf'] == true
) {
$GLOBALS['dbi']->postConnectControl();
}