Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2004-09-14 18:21:31 +0400
committerMichal Čihař <michal@cihar.com>2004-09-14 18:21:31 +0400
commit4e37b2911337c00e3fc0aa922f0df215e1918051 (patch)
tree0175d1e1bf8f2f7087e051ea16f7a8608ba9d7a1 /themes.php
parent3b9fad6607da428bcc06922457123510ab2ad8b0 (diff)
Better theme version check (bug #1023029).
Diffstat (limited to 'themes.php')
-rw-r--r--themes.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/themes.php b/themes.php
index a210a67439..937708dbf8 100644
--- a/themes.php
+++ b/themes.php
@@ -88,19 +88,22 @@ if ($handleThemes = opendir($path_to_themes)) { // open themes
while (false !== ($PMA_Theme = readdir($handleThemes))) { // get screens
if ($PMA_Theme != "." && $PMA_Theme != "..") {
$screen_directory = $path_to_themes . $PMA_Theme;
-
+
// check for theme requires/name
- unset($theme_name, $theme_version);
+ unset($theme_name, $theme_generation, $theme_version);
@include($path_to_themes . $PMA_Theme . '/info.inc.php');
-
+
// did it set correctly?
- if (!isset($theme_name, $theme_version))
+ if (!isset($theme_name, $theme_generation, $theme_version))
continue; // invalid theme
-
+
+ if ($theme_generation != PMA_THEME_GENERATION)
+ continue; // different generation
+
if ($theme_version < PMA_THEME_VERSION)
continue; // too old version
-
-
+
+
if (is_dir($screen_directory) && @file_exists($screen_directory.'/screen.png')) { // if screen exists then output
?>
<tr>
@@ -116,7 +119,7 @@ if ($handleThemes = opendir($path_to_themes)) { // open themes
<!--
document.write('<a href="#top" onclick="takeThis(\'<?php echo $PMA_Theme; ?>\'); return false;">');
document.write('<img src="<?php echo $screen_directory; ?>/screen.png" border="1" ');
- if (document.getElementById) {
+ if (document.getElementById) {
document.write('style="border: 1px solid #000000;" ');
}
document.write('alt="<?php echo htmlspecialchars(addslashes($theme_name)); ?> - Theme" ');
@@ -137,11 +140,11 @@ if ($handleThemes = opendir($path_to_themes)) { // open themes
<tr>
<td><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td>
</tr>
-<?php
+<?php
} // end 'screen output'
} // end 'check theme'
} // end 'get screens'
- closedir($handleThemes);
+ closedir($handleThemes);
} // end 'open themes'
?>
</table>