[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] CVS: squirrelmail/functions options.php,1.34.2.7,1.34.2.8
From:       Paul Lesneiwski <pdontthink () users ! sourceforge ! net>
Date:       2004-07-30 12:33:05
Message-ID: E1BqWZN-0007o1-8L () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/squirrelmail/squirrelmail/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29946

Modified Files:
      Tag: SM-1_4-STABLE
	options.php 
Log Message:
Custom option page values now repopulate correctly when save action goes back to same options page

Index: options.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/options.php,v
retrieving revision 1.34.2.7
retrieving revision 1.34.2.8
diff -u -w -r1.34.2.7 -r1.34.2.8
--- options.php	25 Jul 2004 13:23:31 -0000	1.34.2.7
+++ options.php	30 Jul 2004 12:33:01 -0000	1.34.2.8
@@ -145,6 +145,12 @@
     function createHTMLWidget() {
         global $javascript_on;
 
+        // Use new value if available 
+        if (!empty($this->new_value)) { 
+            $tempValue = $this->value;
+            $this->value = $this->new_value;
+        }
+
         /* Get the widget for this option type. */
         switch ($this->type) {
             case SMOPT_TYPE_STRING:
@@ -183,6 +189,11 @@
         /* Add the "post script" for this option. */
         $result .= $this->post_script;
         
+        // put correct value back if need be
+        if (!empty($this->new_value)) {
+            $this->value = $tempValue;
+        }
+
         /* Now, return the created widget. */
         return ($result);
     }



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
--
squirrelmail-cvs mailing list
List Address: squirrelmail-cvs@lists.sourceforge.net
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
http://squirrelmail.org/cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic