bug 1006011, save the chosen connection collation into a cookie
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2004-08-26 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* index.php, libraries/common.lib.php: bug 1006011: now we save
|
||||
the chosen connection collation into a cookie
|
||||
|
||||
2004-08-25 Michal Čihař <michal@cihar.com>
|
||||
* main.php: Don't show port after verbose name (bug #1013401).
|
||||
|
||||
|
15
index.php
15
index.php
@@ -2,7 +2,6 @@
|
||||
/* $Id$ */
|
||||
// vim: expandtab sw=4 ts=4 sts=4:
|
||||
|
||||
|
||||
/**
|
||||
* Gets core libraries and defines some variables
|
||||
*/
|
||||
@@ -12,6 +11,20 @@ require_once('./libraries/common.lib.php');
|
||||
* Includes the ThemeManager if it hasn't been included yet
|
||||
*/
|
||||
require_once('./libraries/select_theme.lib.php');
|
||||
|
||||
/**
|
||||
* Saves collation_connection (coming from main.php) in a cookie
|
||||
*/
|
||||
|
||||
// (from grab_globals)
|
||||
if (isset($collation_connection)) {
|
||||
if (!isset($pma_uri_parts)) {
|
||||
$pma_uri_parts = parse_url($cfg['PmaAbsoluteUri']);
|
||||
$cookie_path = substr($pma_uri_parts['path'], 0, strrpos($pma_uri_parts['path'], '/'));
|
||||
$is_https = (isset($pma_uri_parts['scheme']) && $pma_uri_parts['scheme'] == 'https') ? 1 : 0;
|
||||
}
|
||||
setcookie('pma_collation_connection', $collation_connection, time() + 60*60*24*30, $cookie_path, '', $is_https);
|
||||
}
|
||||
// Gets the default font sizes
|
||||
PMA_setFontSizes();
|
||||
|
||||
|
@@ -347,6 +347,15 @@ if (!is_dir($pmaThemeImage)) {
|
||||
}
|
||||
// end theme manager
|
||||
|
||||
/**
|
||||
* collation_connection
|
||||
*/
|
||||
// (could be improved by executing it after the MySQL connection only if
|
||||
// PMA_MYSQL_INT_VERSION >= 40100 )
|
||||
if (isset($_COOKIE) && !empty($_COOKIE['pma_collation_connection']) && empty($_POST['collation_connection'])) {
|
||||
$collation_connection = $_COOKIE['pma_collation_connection'];
|
||||
}
|
||||
|
||||
|
||||
if ($is_minimum_common == FALSE) {
|
||||
/**
|
||||
|
Reference in New Issue
Block a user