IMPORTANT PATCH:

----------------

* Altered the theming system to follow the naming convention of class files.
  theme.class has been renamed to theme.class.php!
* I fixed the default theme and my own theme, but none of the others themes
  for your convenience...  This means *you* have to rename your theme on CVS
  by (a) removing it from CVS and (b) adding it back with a its new name:
  'theme.class.php'.
    For the clueless:
    mv theme.class theme.class.php
    cvs remove theme.class
    cvs add theme.class.php
    cvs commit theme.class.php
* Sorry for breaking things ... try to fix it asap and everything will be
  OK. ;)
3-00
Dries Buytaert 2000-06-05 16:21:47 +00:00
parent 467817f922
commit 24ec602ce3
2 changed files with 4 additions and 4 deletions

View File

@ -159,7 +159,7 @@ switch ($op) {
### Loop (dynamically) through all available themes: ### Loop (dynamically) through all available themes:
$handle = opendir('themes'); $handle = opendir('themes');
while ($file = readdir($handle)) { while ($file = readdir($handle)) {
if(!ereg("^\.",$file) && file_exists("themes/$file/theme.class")) { if(!ereg("^\.",$file) && file_exists("themes/$file/theme.class.php")) {
$options .= "<OPTION VALUE=\"$file\"". (((!empty($userinfo[theme])) && ($file == $cfg_theme)) || ($user->theme == $file) ? " SELECTED" : "") .">$file</OPTION>"; $options .= "<OPTION VALUE=\"$file\"". (((!empty($userinfo[theme])) && ($file == $cfg_theme)) || ($user->theme == $file) ? " SELECTED" : "") .">$file</OPTION>";
} }
} }

View File

@ -2,12 +2,12 @@
global $user; global $user;
### Verify theme: ### Verify theme:
if (isset($user->theme) && file_exists("themes/$user->theme/theme.class")) { if (isset($user->theme) && file_exists("themes/$user->theme/theme.class.php")) {
include "themes/$user->theme/theme.class"; include "themes/$user->theme/theme.class.php";
} }
else { else {
include "config.inc"; include "config.inc";
include "themes/$cfg_theme/theme.class"; include "themes/$cfg_theme/theme.class.php";
} }
$theme = new Theme(); $theme = new Theme();