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

List:       squirrelmail-cvs
Subject:    [SM-CVS] SF.net SVN: squirrelmail: [13056]
From:       pdontthink () users ! sourceforge ! net
Date:       2008-04-17 20:54:33
Message-ID: E1Jmb7p-00048x-7k () sc8-pr-svn2 ! sourceforge ! net
[Download RAW message or body]

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

Log Message:
-----------
Since multiple select and checkbox widgets may not appear in the post, make sure \
empty values are pushed into the object's new value slot when saving

Modified Paths:
--------------
    trunk/squirrelmail/functions/options.php

Modified: trunk/squirrelmail/functions/options.php
===================================================================
--- trunk/squirrelmail/functions/options.php	2008-04-17 20:06:40 UTC (rev 13055)
+++ trunk/squirrelmail/functions/options.php	2008-04-17 20:54:32 UTC (rev 13056)
@@ -795,6 +795,15 @@
     else
         setPref($data_dir, $username, $option->name, $option->new_value);
 
+
+    // if a checkbox or multi select is zeroed/cleared out, it
+    // needs to have an empty value pushed into its "new_value" slot
+    //
+    if (($option->type == SMOPT_TYPE_STRLIST_MULTI
+      || $option->type == SMOPT_TYPE_BOOLEAN_CHECKBOX)
+     && is_null($option->new_value))
+        $option->new_value = '';
+
 }
 
 /**


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