Revision: 1392
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1392&view=rev
Author:   cimorrison
Date:     2010-07-26 15:06:42 +0000 (Mon, 26 Jul 2010)

Log Message:
-----------
- Removed a redundant line of code
- Fixed a bug causing integer custom fields of 0 to be written as NULL

Modified Paths:
--------------
    mrbs/branches/custom_entry_fields/web/mrbs_sql.inc

Modified: mrbs/branches/custom_entry_fields/web/mrbs_sql.inc
===================================================================
--- mrbs/branches/custom_entry_fields/web/mrbs_sql.inc  2010-07-26 14:53:12 UTC 
(rev 1391)
+++ mrbs/branches/custom_entry_fields/web/mrbs_sql.inc  2010-07-26 15:06:42 UTC 
(rev 1392)
@@ -235,7 +235,6 @@
   
   $sql_col = array();
   $sql_val = array();
-  $sql = "INSERT INTO $table ";
   $table_no_prefix = substr($table, strlen($db_tbl_prefix));  // strip the 
prefix off the table name
     
   $fields = sql_field_info($table);
@@ -298,7 +297,7 @@
           switch ($field['nature'])
           {
             case 'integer':
-              if (!isset($data['custom_fields'][$key]) || 
($data['custom_fields'][$key] == ''))
+              if (!isset($data['custom_fields'][$key]) || 
($data['custom_fields'][$key] === ''))
               {
                 // If the field length is greater than 2 bytes then this is a 
genuine 
                 // integer and we will write NULL to the database.    We need 
to do this


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

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to