diff --git a/ChangeLog b/ChangeLog index 6b51ff06d..284ed5dd5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #1989813 [interface] Deleting multiple views (space in name) - bug #1992628 [parser] SQL parser removes essential space - bug #1989281 [export] CSV for MS Excel incorrect escaping of double quotes +- bug #1959855 [interface] Font size option problem when no config file 2.11.7.0 (2008-06-23) - bug #1908719 [interface] New field cannot be auto-increment and primary key diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 7f5b8d7f2..5e83e161b 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -545,12 +545,14 @@ class PMA_Config /** * returns a unique value to force a CSS reload if either the config - * or the theme changes + * or the theme changes; + * must also check the pma_fontsize cookie in case there is no + * config file * @return int Unix timestamp */ function getThemeUniqueValue() { - return intval($_SESSION['PMA_Config']->get('fontsize')) + ($this->source_mtime + $this->default_source_mtime + $_SESSION['PMA_Theme']->mtime_info + $_SESSION['PMA_Theme']->filesize_info); + return intval((null !== $_SESSION['PMA_Config']->get('fontsize') ? $_SESSION['PMA_Config']->get('fontsize') : $_COOKIE['pma_fontsize'])) + ($this->source_mtime + $this->default_source_mtime + $_SESSION['PMA_Theme']->mtime_info + $_SESSION['PMA_Theme']->filesize_info); } /** @@ -1003,6 +1005,14 @@ class PMA_Config function getFontsizeSelection() { $current_size = $_SESSION['PMA_Config']->get('fontsize'); + // for the case when there is no config file (this is supported) + if (empty($current_size)) { + if (isset($_COOKIE['pma_fontsize'])) { + $current_size = $_COOKIE['pma_fontsize']; + } else { + $current_size = '82%'; + } + } $options = PMA_Config::getFontsizeOptions($current_size); $return = '' . "\n"; diff --git a/phpmyadmin.css.php b/phpmyadmin.css.php index fcdc8bdf9..3aee8092d 100644 --- a/phpmyadmin.css.php +++ b/phpmyadmin.css.php @@ -39,7 +39,7 @@ header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT'); ?> html { - font-size: get('fontsize'); ?>; + font-size: get('fontsize') ? $_SESSION['PMA_Config']->get('fontsize') : $_COOKIE['pma_fontsize']); ?>; } input, select, textarea {