bug #1864468 [display] Theme does not switch to darkblue_orange

This commit is contained in:
Marc Delisle
2008-01-05 13:33:05 +00:00
parent dafe790a10
commit 603e566c0d
7 changed files with 20 additions and 9 deletions

View File

@@ -54,6 +54,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #1814679 [display] Database selection pagination when switching servers - bug #1814679 [display] Database selection pagination when switching servers
- patch #1861717 [export] CSV Escape character not exported right, - patch #1861717 [export] CSV Escape character not exported right,
thanks to nicolasdigraf thanks to nicolasdigraf
- bug #1864468 [display] Theme does not switch to darkblue_orange
2.11.3.0 (2007-12-08) 2.11.3.0 (2007-12-08)
- patch #1818389 to remove a notice (failed to flush buffer), thanks to - patch #1818389 to remove a notice (failed to flush buffer), thanks to

View File

@@ -94,7 +94,7 @@ if (is_array($foreignData['disp_row'])) {
<title>phpMyAdmin</title> <title>phpMyAdmin</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
<link rel="stylesheet" type="text/css" <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 src="./js/functions.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[

View File

@@ -534,9 +534,9 @@ class PMA_Config
* or the theme changes * or the theme changes
* @return int Unix timestamp * @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);
} }
/** /**

View File

@@ -9,9 +9,9 @@
/** /**
* handles theme * handles theme
* *
* @todo add the possibility to make a theme depends on another theme and by default on orignal * @todo add the possibility to make a theme depends on another theme and by default on original
* @todo make all components optional - taking missing compnents from 'parent' theme * @todo make all components optional - taking missing components from 'parent' theme
* @todo make css optionaly replacing 'parent' css or extending it (by appending at the end) * @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 * @todo add an optional global css file - which will be used for both frames
* *
*/ */
@@ -58,6 +58,14 @@ class PMA_Theme {
*/ */
var $mtime_info = 0; 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 * @access public
* @uses PMA_Theme::getPath() * @uses PMA_Theme::getPath()
@@ -65,6 +73,7 @@ class PMA_Theme {
* @uses PMA_Theme::setVersion() * @uses PMA_Theme::setVersion()
* @uses PMA_Theme::setName() * @uses PMA_Theme::setName()
* @uses filemtime() * @uses filemtime()
* @uses filesize()
* @uses file_exists() * @uses file_exists()
* @return boolean whether loading them info was successful or not * @return boolean whether loading them info was successful or not
*/ */
@@ -86,6 +95,7 @@ class PMA_Theme {
} }
$this->mtime_info = filemtime($this->getPath() . '/info.inc.php'); $this->mtime_info = filemtime($this->getPath() . '/info.inc.php');
$this->filesize_info = filesize($this->getPath() . '/info.inc.php');
if (isset($theme_full_version)) { if (isset($theme_full_version)) {
$this->setVersion($theme_full_version); $this->setVersion($theme_full_version);

View File

@@ -42,5 +42,5 @@ if ($GLOBALS['text_dir'] == 'ltr') {
} }
?></title> ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" /> <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" /> <link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : ''; ?>print.css" media="print" />

View File

@@ -44,7 +44,7 @@ if ($text_dir == 'ltr') {
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<title><?php echo $strSQLResult; ?> - phpMyAdmin <?php echo PMA_VERSION ?></title> <title><?php echo $strSQLResult; ?> - phpMyAdmin <?php echo PMA_VERSION ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" /> <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> </style>
</head> </head>

View File

@@ -129,7 +129,7 @@ $pos = $_SESSION['userconf']['navi_limit_offset'];
content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" /> content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
<base target="frame_content" /> <base target="frame_content" />
<link rel="stylesheet" type="text/css" <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/navigation.js"></script>
<script type="text/javascript" src="js/functions.js"></script> <script type="text/javascript" src="js/functions.js"></script>
<script type="text/javascript"> <script type="text/javascript">