various theme selector fixes
This commit is contained in:
@@ -273,7 +273,8 @@ if (strtolower($cfg['OBGzip']) == 'auto') {
|
||||
* If not, it will use default images
|
||||
*/
|
||||
// Theme Manager
|
||||
if (!isset($_COOKIE['theme']) || empty($_COOKIE['theme'])){
|
||||
if (!isset($_COOKIE['pma_theme']) || empty($_COOKIE['pma_theme'])){
|
||||
$GLOBALS['theme'] = $cfg['ThemeDefault'];
|
||||
$ThemeDefaultOk = FALSE;
|
||||
if ($cfg['ThemePath']!='' && $cfg['ThemePath'] != FALSE) {
|
||||
$tmp_theme_mainpath = './' . $cfg['ThemePath'];
|
||||
@@ -294,9 +295,10 @@ if (!isset($_COOKIE['theme']) || empty($_COOKIE['theme'])){
|
||||
$pmaThemeImage = './images/';
|
||||
}
|
||||
} else {
|
||||
if ($_COOKIE['theme']!='original') {
|
||||
$pmaThemeImage = './' . $cfg['ThemePath'] . '/' . $_COOKIE['theme'] . '/img/';
|
||||
$tmp_color_file = './' . $cfg['ThemePath'] . '/' . $_COOKIE['theme'] . '/colors.inc.php';
|
||||
$GLOBALS['theme'] = $_COOKIE['pma_theme'];
|
||||
if ($_COOKIE['pma_theme'] != 'original') {
|
||||
$pmaThemeImage = './' . $cfg['ThemePath'] . '/' . $_COOKIE['pma_theme'] . '/img/';
|
||||
$tmp_color_file = './' . $cfg['ThemePath'] . '/' . $_COOKIE['pma_theme'] . '/colors.inc.php';
|
||||
if (@file_exists($tmp_color_file)) {
|
||||
include($tmp_color_file);
|
||||
}
|
||||
|
@@ -78,24 +78,24 @@ if (!isset($pma_uri_parts)) { // cookie-setup if needed
|
||||
} // end cookie setup
|
||||
|
||||
if (isset($set_theme)) { // if user submit a theme
|
||||
setcookie('theme', $set_theme, time() + 60*60*24*30, $cookie_path, '', $is_https);
|
||||
setcookie('pma_theme', $set_theme, time() + 60*60*24*30, $cookie_path, '', $is_https);
|
||||
} else { // else check if user have a theme cookie
|
||||
if (!isset($_COOKIE['theme']) || empty($_COOKIE['theme'])) {
|
||||
if (!isset($_COOKIE['pma_theme']) || empty($_COOKIE['pma_theme'])) {
|
||||
if ($PMA_ThemeDefault == TRUE) {
|
||||
if (basename($PHP_SELF) == 'index.php') {
|
||||
setcookie('theme', $cfg['ThemeDefault'], time() + 60*60*24*30, $cookie_path, '', $is_https);
|
||||
setcookie('pma_theme', $cfg['ThemeDefault'], time() + 60*60*24*30, $cookie_path, '', $is_https);
|
||||
}
|
||||
$pmaTheme=$cfg['ThemeDefault'];
|
||||
}else{
|
||||
if (basename($PHP_SELF) == 'index.php') {
|
||||
setcookie('theme', 'original', time() + 60*60*24*30, $cookie_path, '', $is_https);
|
||||
setcookie('pma_theme', 'original', time() + 60*60*24*30, $cookie_path, '', $is_https);
|
||||
}
|
||||
$pmaTheme='original';
|
||||
}
|
||||
} else {
|
||||
$pmaTheme=$_COOKIE['theme'];
|
||||
$pmaTheme=$_COOKIE['pma_theme'];
|
||||
if (basename($PHP_SELF) == 'index.php') {
|
||||
setcookie('theme', $pmaTheme, time() + 60*60*24*30, $cookie_path, '', $is_https);
|
||||
setcookie('pma_theme', $pmaTheme, time() + 60*60*24*30, $cookie_path, '', $is_https);
|
||||
}
|
||||
}
|
||||
} // end if
|
||||
|
Reference in New Issue
Block a user