فهرست منبع

* Fixed a bug I created where the themes would get wiped out.

Tyler Akins 24 سال پیش
والد
کامیت
7a319d40f3
1فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 5 3
      src/load_prefs.php

+ 5 - 3
src/load_prefs.php

@@ -16,8 +16,10 @@
    define('load_prefs_php', true);
    define('load_prefs_php', true);
 
 
    global $theme, $chosen_theme, $color;
    global $theme, $chosen_theme, $color;
-   $theme = array();
-   $color = array();
+   if (! isset($theme))
+      $theme = array();
+   if (! isset($color))
+      $color = array();
    include('../src/validate.php');
    include('../src/validate.php');
    include("../config/config.php");
    include("../config/config.php");
    include("../functions/prefs.php");
    include("../functions/prefs.php");
@@ -42,7 +44,7 @@
    if (isset($chosen_theme) && $in_ary && (file_exists($chosen_theme))) {
    if (isset($chosen_theme) && $in_ary && (file_exists($chosen_theme))) {
       @include($chosen_theme);
       @include($chosen_theme);
    } else {
    } else {
-      if (file_exists($theme[0]["PATH"])) {
+      if (file_exists(isset($theme) && isset($theme[0]) && $theme[0]["PATH"])) {
          @include($theme[0]["PATH"]);
          @include($theme[0]["PATH"]);
       } else {
       } else {
           #
           #