Make default theme actually work. #557313
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 9 Aug 2002 13:09:32 +0000 (13:09 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 9 Aug 2002 13:09:32 +0000 (13:09 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3282 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
config/conf.pl
config/config_default.php
functions/date.php
src/load_prefs.php

index 9039efd6fd4790e76e058ad7cf91549dec6f14ee..c18146e06731762a0a171d8476d93978ec6ab50f 100644 (file)
--- 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
   - 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
 --------------------
   
 Version 1.2.7 -- CVS
 --------------------
index 272d64e85049de71be86b21613a837fd57b29573..a25019b2a0ed9b819deced86bf60480a316ae7da 100755 (executable)
@@ -2417,6 +2417,8 @@ sub save_data {
 
        # strings
         print CF "\$theme_css = '$theme_css';\n";
 
        # 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";
         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";
index a1e2712646ec5194fed731f587c48ee8ec239298..d37a2fee0ec995a98ae5803d160c8afb51786f2f 100644 (file)
@@ -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.
  */
  * 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;
 
 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';
 
 $theme[0]['PATH'] = '../themes/default_theme.php';
 $theme[0]['NAME'] = 'Default';
 
index 8a1e551b98b5dd4bcc6e7280e9f92b41e839c4e2..706616fc274137b756547f9e3be687a629bf87c6 100644 (file)
@@ -68,7 +68,6 @@ function getGMTSeconds($stamp, $gmt) {
         case 'KST':
             $gmt = '+0900';     
             break;
         case 'KST':
             $gmt = '+0900';     
             break;
-            break;
     }
     
     if (substr($gmt, 0, 1) == '-') {
     }
     
     if (substr($gmt, 0, 1) == '-') {
index fb2dd9e51dc4a29645a9061eca4b683cfc869006..457aef0e67539591f876ea53227cf533cf7c894b 100644 (file)
@@ -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($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
     } else {
         /**
          * This theme as a failsafe if no themes were found. It makes