Fix bug: Recent tables list doesn't honor current server

This commit is contained in:
Aris Feryanto 2011-06-21 10:54:48 +07:00
parent 7e5fddf4ae
commit 6e65d3d7fc

View File

@ -46,11 +46,14 @@ class PMA_RecentTable
$this->pma_table = PMA_backquote($GLOBALS['cfg']['Server']['pmadb']) .".".
PMA_backquote($GLOBALS['cfg']['Server']['recent']);
}
if (! isset($_SESSION['tmp_user_values']['recent_tables'])) {
$_SESSION['tmp_user_values']['recent_tables'] =
$host = $GLOBALS['cfg']['Server']['host'] .
(empty($GLOBALS['cfg']['Server']['port']) ?
'' : ':' . $GLOBALS['cfg']['Server']['port']);
if (! isset($_SESSION['tmp_user_values']['recent_tables'][$host])) {
$_SESSION['tmp_user_values']['recent_tables'][$host] =
isset($this->pma_table) ? $this->getFromDb() : array();
}
$this->tables =& $_SESSION['tmp_user_values']['recent_tables'];
$this->tables =& $_SESSION['tmp_user_values']['recent_tables'][$host];
}
/**