Skip to content

Commit

Permalink
bug #1864468 [display] Theme does not switch to darkblue_orange
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Delisle committed Jan 5, 2008
1 parent dafe790 commit 603e566
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #1814679 [display] Database selection pagination when switching servers
- patch #1861717 [export] CSV Escape character not exported right,
thanks to nicolasdigraf
- bug #1864468 [display] Theme does not switch to darkblue_orange

2.11.3.0 (2007-12-08)
- patch #1818389 to remove a notice (failed to flush buffer), thanks to
Expand Down
2 changes: 1 addition & 1 deletion browse_foreigners.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<title>phpMyAdmin</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
<link rel="stylesheet" type="text/css"
href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&amp;js_frame=right&amp;nocache=<?php echo $_SESSION['PMA_Config']->getMtime(); ?>" />
href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&amp;js_frame=right&amp;nocache=<?php echo $_SESSION['PMA_Config']->getThemeUniqueValue(); ?>" />
<script src="./js/functions.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
Expand Down
4 changes: 2 additions & 2 deletions libraries/Config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,9 @@ function getSource()
* or the theme changes
* @return int Unix timestamp
*/
function getMtime()
function getThemeUniqueValue()
{
return intval($_SESSION['PMA_Config']->get('fontsize')) + ($this->source_mtime + $this->default_source_mtime + $_SESSION['PMA_Theme']->mtime_info);
return intval($_SESSION['PMA_Config']->get('fontsize')) + ($this->source_mtime + $this->default_source_mtime + $_SESSION['PMA_Theme']->mtime_info + $_SESSION['PMA_Theme']->filesize_info);
}

/**
Expand Down
16 changes: 13 additions & 3 deletions libraries/Theme.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
/**
* handles theme
*
* @todo add the possibility to make a theme depends on another theme and by default on orignal
* @todo make all components optional - taking missing compnents from 'parent' theme
* @todo make css optionaly replacing 'parent' css or extending it (by appending at the end)
* @todo add the possibility to make a theme depends on another theme and by default on original
* @todo make all components optional - taking missing components from 'parent' theme
* @todo make css optionally replacing 'parent' css or extending it (by appending at the end)
* @todo add an optional global css file - which will be used for both frames
*
*/
Expand Down Expand Up @@ -58,13 +58,22 @@ class PMA_Theme {
*/
var $mtime_info = 0;

/**
* needed because sometimes, the mtime for different themes
* is identical
* @var integer filesize for info file
* @access protected
*/
var $filesize_info = 0;

/**
* @access public
* @uses PMA_Theme::getPath()
* @uses PMA_Theme::$mtime_info
* @uses PMA_Theme::setVersion()
* @uses PMA_Theme::setName()
* @uses filemtime()
* @uses filesize()
* @uses file_exists()
* @return boolean whether loading them info was successful or not
*/
Expand All @@ -86,6 +95,7 @@ function loadInfo()
}

$this->mtime_info = filemtime($this->getPath() . '/info.inc.php');
$this->filesize_info = filesize($this->getPath() . '/info.inc.php');

if (isset($theme_full_version)) {
$this->setVersion($theme_full_version);
Expand Down
2 changes: 1 addition & 1 deletion libraries/header_meta_style.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
}
?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : ''; ?>phpmyadmin.css.php?<?php echo PMA_generate_common_url(); ?>&amp;js_frame=<?php echo isset($print_view) ? 'print' : 'right'; ?>&amp;nocache=<?php echo $_SESSION['PMA_Config']->getMtime(); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : ''; ?>phpmyadmin.css.php?<?php echo PMA_generate_common_url(); ?>&amp;js_frame=<?php echo isset($print_view) ? 'print' : 'right'; ?>&amp;nocache=<?php echo $_SESSION['PMA_Config']->getThemeUniqueValue(); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : ''; ?>print.css" media="print" />
2 changes: 1 addition & 1 deletion libraries/header_printview.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<title><?php echo $strSQLResult; ?> - phpMyAdmin <?php echo PMA_VERSION ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
<link rel="stylesheet" type="text/css" href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&amp;js_frame=print&amp;nocache=<?php echo $_SESSION['PMA_Config']->getMtime(); ?>" />
<link rel="stylesheet" type="text/css" href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&amp;js_frame=print&amp;nocache=<?php echo $_SESSION['PMA_Config']->getThemeUniqueValue(); ?>" />
</style>
</head>

Expand Down
2 changes: 1 addition & 1 deletion navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function PMA_exitNavigationFrame()
content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
<base target="frame_content" />
<link rel="stylesheet" type="text/css"
href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&amp;js_frame=left&amp;nocache=<?php echo $_SESSION['PMA_Config']->getMtime(); ?>" />
href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&amp;js_frame=left&amp;nocache=<?php echo $_SESSION['PMA_Config']->getThemeUniqueValue(); ?>" />
<script type="text/javascript" src="js/navigation.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
<script type="text/javascript">
Expand Down

0 comments on commit 603e566

Please sign in to comment.