Revision: 1056
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1056&view=rev
Author:   cimorrison
Date:     2009-03-19 23:22:14 +0000 (Thu, 19 Mar 2009)

Log Message:
-----------
Fixed problem that stopped editing of area details working when using periods.

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

Modified: mrbs/trunk/web/edit_area_room.php
===================================================================
--- mrbs/trunk/web/edit_area_room.php   2009-03-19 22:52:37 UTC (rev 1055)
+++ mrbs/trunk/web/edit_area_room.php   2009-03-19 23:22:14 UTC (rev 1056)
@@ -214,27 +214,33 @@
     }
     //
     
-    // Check morningstarts, eveningends, and resolution for consistency
-    $start_first_slot = ($area_morningstarts*60) + 
$area_morningstarts_minutes;   // minutes
-    $start_last_slot  = ($area_eveningends*60) + $area_eveningends_minutes;    
   // minutes
-    $start_difference = ($start_last_slot - $start_first_slot);         // 
minutes
-    if (($start_difference < 0) or ($start_difference%$area_res_mins != 0))
+    if (!$enable_periods)
     {
-      $valid_resolution = FALSE;
+      // Check morningstarts, eveningends, and resolution for consistency
+      $start_first_slot = ($area_morningstarts*60) + 
$area_morningstarts_minutes;   // minutes
+      $start_last_slot  = ($area_eveningends*60) + $area_eveningends_minutes;  
     // minutes
+      $start_difference = ($start_last_slot - $start_first_slot);         // 
minutes
+      if (($start_difference < 0) or ($start_difference%$area_res_mins != 0))
+      {
+        $valid_resolution = FALSE;
+      }
     }
     
     // If everything is OK, update the database
     if ((FALSE != $valid_email) && (FALSE != $valid_resolution))
     {
       $sql = "UPDATE $tbl_area SET area_name='" . addslashes($area_name)
-        . "', area_admin_email='" . addslashes($area_admin_email)
-        . "', resolution=" . $area_res_mins * 60
-        . ", default_duration=" . $area_def_duration_mins * 60
-        . ", morningstarts=" . $area_morningstarts
-        . ", morningstarts_minutes=" . $area_morningstarts_minutes
-        . ", eveningends=" . $area_eveningends
-        . ", eveningends_minutes=" . $area_eveningends_minutes
-        . " WHERE id=$area";
+        . "', area_admin_email='" . addslashes($area_admin_email) . "'";
+      if (!$enable_periods)
+      {
+        $sql .= ", resolution=" . $area_res_mins * 60
+              . ", default_duration=" . $area_def_duration_mins * 60
+              . ", morningstarts=" . $area_morningstarts
+              . ", morningstarts_minutes=" . $area_morningstarts_minutes
+              . ", eveningends=" . $area_eveningends
+              . ", eveningends_minutes=" . $area_eveningends_minutes;
+      }
+      $sql .= " WHERE id=$area";
       if (sql_command($sql) < 0)
       {
         fatal_error(0, get_vocab("update_area_failed") . sql_error());


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

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to