Make server switching honour more server settings (patch #1630104).
This commit is contained in:
@@ -7,6 +7,8 @@ $HeadURL$
|
|||||||
|
|
||||||
2007-01-18 Michal Čihař <michal@cihar.com>
|
2007-01-18 Michal Čihař <michal@cihar.com>
|
||||||
* lang/czech: Updated.
|
* lang/czech: Updated.
|
||||||
|
* libraries/auth/cookie.auth.lib.php: Make server switching honour more
|
||||||
|
server settings (patch #1630104).
|
||||||
|
|
||||||
2007-01-17 Marc Delisle <lem9@users.sourceforge.net>
|
2007-01-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* lang/turkish: update, thanks to Burak Yavuz - bourock
|
* lang/turkish: update, thanks to Burak Yavuz - bourock
|
||||||
|
@@ -413,15 +413,18 @@ function PMA_auth_set_user()
|
|||||||
// Ensures valid authentication mode, 'only_db', bookmark database and
|
// Ensures valid authentication mode, 'only_db', bookmark database and
|
||||||
// table names and relation table name are used
|
// table names and relation table name are used
|
||||||
if ($cfg['Server']['user'] != $PHP_AUTH_USER) {
|
if ($cfg['Server']['user'] != $PHP_AUTH_USER) {
|
||||||
$servers_cnt = count($cfg['Servers']);
|
foreach ($cfg['Servers'] as $idx => $current) {
|
||||||
for ($i = 1; $i <= $servers_cnt; $i++) {
|
if ($current['host'] == $cfg['Server']['host']
|
||||||
if (isset($cfg['Servers'][$i])
|
&& $current['port'] == $cfg['Server']['port']
|
||||||
&& ($cfg['Servers'][$i]['host'] == $cfg['Server']['host'] && $cfg['Servers'][$i]['user'] == $PHP_AUTH_USER)) {
|
&& $current['socket'] == $cfg['Server']['socket']
|
||||||
$server = $i;
|
&& $current['ssl'] == $cfg['Server']['ssl']
|
||||||
$cfg['Server'] = $cfg['Servers'][$i];
|
&& $current['connect_type'] == $cfg['Server']['connect_type']
|
||||||
|
&& $current['user'] == $PHP_AUTH_USER) {
|
||||||
|
$server = $idx;
|
||||||
|
$cfg['Server'] = $current;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} // end for
|
} // end foreach
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
$pma_server_changed = false;
|
$pma_server_changed = false;
|
||||||
|
Reference in New Issue
Block a user