Revision: 2224
          http://mrbs.svn.sourceforge.net/mrbs/?rev=2224&view=rev
Author:   cimorrison
Date:     2011-12-31 11:32:08 +0000 (Sat, 31 Dec 2011)
Log Message:
-----------
Fixed two bugs:
(1) Undefined index error if a mandatory field is defined in the config file 
but doesn't exist in the database
(2) MRBS not picking up mandatory integer fields when JavaScript is disabled

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

Modified: mrbs/trunk/web/edit_entry_handler.php
===================================================================
--- mrbs/trunk/web/edit_entry_handler.php       2011-12-31 11:06:23 UTC (rev 
2223)
+++ mrbs/trunk/web/edit_entry_handler.php       2011-12-31 11:32:08 UTC (rev 
2224)
@@ -103,7 +103,7 @@
     $custom_fields[$field['name']] = get_form_var($var, $f_type);
     if (($f_type == 'int') && ($custom_fields[$field['name']] === ''))
     {
-      unset($custom_fields[$field['name']]);
+      $custom_fields[$field['name']] = NULL;
     }
   }
 }
@@ -367,7 +367,7 @@
     foreach ($is_mandatory_field as $field => $value)
     {
       $field = preg_replace('/^entry\./', '', $field);
-      if ($value && ($custom_fields[$field] == ''))
+      if ($value && array_key_exists($field, $custom_fields) && 
($custom_fields[$field] == ''))
       {
         print_header($day, $month, $year, $area, isset($room) ? $room : "");
         ?>

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


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to