From 57c6fabc12a43d187c9bd7c9585a6ed4b2a8ec77 Mon Sep 17 00:00:00 2001 From: kink Date: Fri, 9 Aug 2002 13:09:32 +0000 Subject: [PATCH] Make default theme actually work. #557313 git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3282 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 2 ++ config/conf.pl | 2 ++ config/config_default.php | 7 +++---- functions/date.php | 1 - src/load_prefs.php | 4 ++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9039efd6..c18146e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -36,6 +36,8 @@ Version 1.3.0-DEVEL -- CVS - Enable people with file_uploads = off to still send mail. Patch from Seth E. Randall. - Moved the generic_header hook back to page_header.php. bug #554278 + - Make default theme work. Bug #557313, thanks Tyler Bannister. + Version 1.2.7 -- CVS -------------------- diff --git a/config/conf.pl b/config/conf.pl index 272d64e8..a25019b2 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -2417,6 +2417,8 @@ sub save_data { # strings print CF "\$theme_css = '$theme_css';\n"; + print CF "\$theme_default = $theme_default;\n"; + for ( $count = 0 ; $count <= $#theme_name ; $count++ ) { print CF "\$theme[$count]['PATH'] = '$theme_path[$count]';\n"; print CF "\$theme[$count]['NAME'] = '$theme_name[$count]';\n"; diff --git a/config/config_default.php b/config/config_default.php index a1e27126..d37a2fee 100644 --- a/config/config_default.php +++ b/config/config_default.php @@ -268,12 +268,11 @@ $force_username_lowercase = false; * To add a new theme to the options that users can choose from, just * add a new number to the array at the bottom, and follow the pattern. */ + +$theme_default = 0; + global $theme; -/** - * The first one HAS to be here, and is your system's default - * theme. It can be any theme you want. - */ $theme[0]['PATH'] = '../themes/default_theme.php'; $theme[0]['NAME'] = 'Default'; diff --git a/functions/date.php b/functions/date.php index 8a1e551b..706616fc 100644 --- a/functions/date.php +++ b/functions/date.php @@ -68,7 +68,6 @@ function getGMTSeconds($stamp, $gmt) { case 'KST': $gmt = '+0900'; break; - break; } if (substr($gmt, 0, 1) == '-') { diff --git a/src/load_prefs.php b/src/load_prefs.php index fb2dd9e5..457aef0e 100644 --- a/src/load_prefs.php +++ b/src/load_prefs.php @@ -37,8 +37,8 @@ $chosen_theme = (!$found_theme ? '' : $chosen_theme); if (isset($chosen_theme) && $found_theme && (file_exists($chosen_theme))) { @include_once($chosen_theme); } else { - if (isset($theme) && isset($theme[0]) && file_exists($theme[0]['PATH'])) { - @include_once($theme[0]['PATH']); + if (isset($theme) && isset($theme[$theme_default]) && file_exists($theme[$theme_default]['PATH'])) { + @include_once($theme[$theme_default]['PATH']); } else { /** * This theme as a failsafe if no themes were found. It makes -- 2.25.1