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

List:       squirrelmail-cvs
Subject:    [SM-CVS] SF.net SVN: squirrelmail: [13055]
From:       pdontthink () users ! sourceforge ! net
Date:       2008-04-17 20:06:41
Message-ID: E1JmaNV-0002Sf-2g () sc8-pr-svn2 ! sourceforge ! net
[Download RAW message or body]

Revision: 13055
          http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=13055&view=rev
Author:   pdontthink
Date:     2008-04-17 13:06:40 -0700 (Thu, 17 Apr 2008)

Log Message:
-----------
More sensible detection of empty widget submissions.  Still does not address the fact \
that select lists and checkboxes may not appear in the POST at all when they are \
empty in the HTML form

Modified Paths:
--------------
    branches/SM-1_4-STABLE/squirrelmail/functions/options.php

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/options.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/options.php	2008-04-17 20:03:36 UTC \
                (rev 13054)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/options.php	2008-04-17 20:06:40 UTC \
(rev 13055) @@ -112,7 +112,7 @@
 
         /* Check for a new value. */
     if ( !sqgetGlobalVar("new_$name", $this->new_value, SQ_POST ) ) {
-            $this->new_value = '';
+            $this->new_value = NULL;
         }
 
         /* Set the default save function. */
@@ -185,7 +185,7 @@
         global $javascript_on, $color;
 
         // Use new value if available
-        if (!empty($this->new_value)) {
+        if (!is_null($this->new_value)) {
             $tempValue = $this->value;
             $this->value = $this->new_value;
         }
@@ -247,7 +247,7 @@
         $result .= $this->post_script;
 
         // put correct value back if need be
-        if (!empty($this->new_value)) {
+        if (!is_null($this->new_value)) {
             $this->value = $tempValue;
         }
 


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
                https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn


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

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