oops, of course cache per server

This commit is contained in:
Sebastian Mendel
2008-01-21 14:40:32 +00:00
parent d4d008cd17
commit f33ea1151e
4 changed files with 51 additions and 45 deletions

View File

@@ -9,7 +9,7 @@
*
*/
if (! isset($_SESSION['mysql_charsets_count'])) {
if (! isset($_SESSION[$GLOBALS['server']]['mysql_charsets_count'])) {
$res = PMA_DBI_query('SHOW CHARACTER SET;');
$mysql_charsets = array();
@@ -55,25 +55,25 @@ if (! isset($_SESSION['mysql_charsets_count'])) {
}
unset($key, $value);
$_SESSION['mysql_charsets'] = $GLOBALS['mysql_charsets'];
$_SESSION['mysql_charsets_descriptions'] = $GLOBALS['mysql_charsets_descriptions'];
$_SESSION['mysql_charsets_count'] = $GLOBALS['mysql_charsets_count'];
$_SESSION['mysql_charsets_available'] = $GLOBALS['mysql_charsets_available'];
$_SESSION['mysql_collations'] = $GLOBALS['mysql_collations'];
$_SESSION['mysql_default_collations'] = $GLOBALS['mysql_default_collations'];
$_SESSION['mysql_collations_flat'] = $GLOBALS['mysql_collations_flat'];
$_SESSION['mysql_collations_count'] = $GLOBALS['mysql_collations_count'];
$_SESSION['mysql_collations_available'] = $GLOBALS['mysql_collations_available'];
$_SESSION[$GLOBALS['server']]['mysql_charsets'] = $GLOBALS['mysql_charsets'];
$_SESSION[$GLOBALS['server']]['mysql_charsets_descriptions'] = $GLOBALS['mysql_charsets_descriptions'];
$_SESSION[$GLOBALS['server']]['mysql_charsets_count'] = $GLOBALS['mysql_charsets_count'];
$_SESSION[$GLOBALS['server']]['mysql_charsets_available'] = $GLOBALS['mysql_charsets_available'];
$_SESSION[$GLOBALS['server']]['mysql_collations'] = $GLOBALS['mysql_collations'];
$_SESSION[$GLOBALS['server']]['mysql_default_collations'] = $GLOBALS['mysql_default_collations'];
$_SESSION[$GLOBALS['server']]['mysql_collations_flat'] = $GLOBALS['mysql_collations_flat'];
$_SESSION[$GLOBALS['server']]['mysql_collations_count'] = $GLOBALS['mysql_collations_count'];
$_SESSION[$GLOBALS['server']]['mysql_collations_available'] = $GLOBALS['mysql_collations_available'];
} else {
$GLOBALS['mysql_charsets'] = $_SESSION['mysql_charsets'];
$GLOBALS['mysql_charsets_descriptions'] = $_SESSION['mysql_charsets_descriptions'];
$GLOBALS['mysql_charsets_count'] = $_SESSION['mysql_charsets_count'];
$GLOBALS['mysql_charsets_available'] = $_SESSION['mysql_charsets_available'];
$GLOBALS['mysql_collations'] = $_SESSION['mysql_collations'];
$GLOBALS['mysql_default_collations'] = $_SESSION['mysql_default_collations'];
$GLOBALS['mysql_collations_flat'] = $_SESSION['mysql_collations_flat'];
$GLOBALS['mysql_collations_count'] = $_SESSION['mysql_collations_count'];
$GLOBALS['mysql_collations_available'] = $_SESSION['mysql_collations_available'];
$GLOBALS['mysql_charsets'] = $_SESSION[$GLOBALS['server']]['mysql_charsets'];
$GLOBALS['mysql_charsets_descriptions'] = $_SESSION[$GLOBALS['server']]['mysql_charsets_descriptions'];
$GLOBALS['mysql_charsets_count'] = $_SESSION[$GLOBALS['server']]['mysql_charsets_count'];
$GLOBALS['mysql_charsets_available'] = $_SESSION[$GLOBALS['server']]['mysql_charsets_available'];
$GLOBALS['mysql_collations'] = $_SESSION[$GLOBALS['server']]['mysql_collations'];
$GLOBALS['mysql_default_collations'] = $_SESSION[$GLOBALS['server']]['mysql_default_collations'];
$GLOBALS['mysql_collations_flat'] = $_SESSION[$GLOBALS['server']]['mysql_collations_flat'];
$GLOBALS['mysql_collations_count'] = $_SESSION[$GLOBALS['server']]['mysql_collations_count'];
$GLOBALS['mysql_collations_available'] = $_SESSION[$GLOBALS['server']]['mysql_collations_available'];
}
define('PMA_CSDROPDOWN_COLLATION', 0);