瀏覽代碼

Make default theme actually work. #557313

Thijs Kinkhorst 23 年之前
父節點
當前提交
680fcac682
共有 5 個文件被更改,包括 9 次插入7 次删除
  1. 2 0
      ChangeLog
  2. 2 0
      config/conf.pl
  3. 3 4
      config/config_default.php
  4. 0 1
      functions/date.php
  5. 2 2
      src/load_prefs.php

+ 2 - 0
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
 --------------------

+ 2 - 0
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";

+ 3 - 4
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';
 

+ 0 - 1
functions/date.php

@@ -68,7 +68,6 @@ function getGMTSeconds($stamp, $gmt) {
         case 'KST':
             $gmt = '+0900';     
             break;
-            break;
     }
     
     if (substr($gmt, 0, 1) == '-') {

+ 2 - 2
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