Revision: 1403
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1403&view=rev
Author:   cimorrison
Date:     2010-08-06 08:53:54 +0000 (Fri, 06 Aug 2010)

Log Message:
-----------
- Fixed previous fix (Rev 1402) properly
- Extended edit_users so that it can cope with non-nullable custom fields

Revision Links:
--------------
    http://mrbs.svn.sourceforge.net/mrbs/?rev=1402&view=rev

Modified Paths:
--------------
    mrbs/trunk/web/edit_users.php

Modified: mrbs/trunk/web/edit_users.php
===================================================================
--- mrbs/trunk/web/edit_users.php       2010-08-06 08:48:07 UTC (rev 1402)
+++ mrbs/trunk/web/edit_users.php       2010-08-06 08:53:54 UTC (rev 1403)
@@ -711,9 +711,12 @@
         switch ($field['nature'])
         {
           case 'integer':
-            if (!isset($value) || ($value == ''))
+            if (!isset($value) || ($value === ''))
             {
-              $value = 'NULL';
+              // Try and set it to NULL when we can because there will be 
cases when we
+              // want to distinguish between NULL and 0 - especially when the 
field
+              // is a genuine integer.
+              $value = ($field['is_nullable']) ? 'NULL' : 0;
             }
             break;
           default:


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 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to