Browse Source

- Issue loading options page always loaded the prefs
initial_value on display, instead of the users' value.

jangliss 19 năm trước cách đây
mục cha
commit
c49201169d
2 tập tin đã thay đổi với 6 bổ sung5 xóa
  1. 2 1
      ChangeLog
  2. 4 4
      functions/options.php

+ 2 - 1
ChangeLog

@@ -22,7 +22,8 @@ Version 1.5.2 - CVS
   - Added new color themes by Jeremy Landes, Tammi Maggard and Lucas Austin-Howe 
     (#1378332), (#1377567), (#1377529), (#1377528), (#1377527), (#1377526), 
     (#1377525), (#1393188).
-  
+  - Issue loading options page always loaded the prefs 
+    initial_value on display, instead of the users' value.
 	
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------

+ 4 - 4
functions/options.php

@@ -176,10 +176,10 @@ class SquirrelOption {
         $this->post_script = '';
 
         /* Check for a current value. */
-        if (!empty($initial_value)) {
-            $this->value = $initial_value;
-        } else if (isset($GLOBALS[$name])) {
+        if (isset($GLOBALS[$name])) {
             $this->value = $GLOBALS[$name];
+        } else if (!empty($initial_value)) {
+            $this->value = $initial_value;
         } else {
             $this->value = '';
         }
@@ -734,4 +734,4 @@ function OptionSubmit( $name ) {
 }
 
 // vim: et ts=4
-?>
+?>