Revision: 2461
          https://sourceforge.net/p/mrbs/code/2461/
Author:   cimorrison
Date:     2012-10-03 13:33:02 +0000 (Wed, 03 Oct 2012)
Log Message:
-----------
Fixed bug whereby the All Day checkbox was being sown when max_duration was 
less than all day

Modified Paths:
--------------
    mrbs/branches/flexible_day_end/web/edit_entry.php

Modified: mrbs/branches/flexible_day_end/web/edit_entry.php
===================================================================
--- mrbs/branches/flexible_day_end/web/edit_entry.php   2012-10-03 12:53:23 UTC 
(rev 2460)
+++ mrbs/branches/flexible_day_end/web/edit_entry.php   2012-10-03 13:33:02 UTC 
(rev 2461)
@@ -146,13 +146,7 @@
            // knows to keep it disabled
            (($disabled) ? " class=\"keep_disabled\"" : "") .
            " id=\"${prefix}seconds${area['id']}\" name=\"${prefix}seconds\" 
onChange=\"adjustSlotSelectors()\">\n";
-  
-  // If the last time is the same as or before the start time, then it's 
really on the next day
-  if ($first >= $last)
-  {
-    $last += 24*60*60;
-  }
-
+ 
   for ($s = $first; $s <= $last; $s += $resolution)
   {
     $slot_string = ($enable_periods) ? $periods[intval(($s-$base)/60)] : 
hour_min($s);
@@ -246,8 +240,14 @@
       $last = (($a['eveningends'] * 60) + $a['eveningends_minutes']) * 60;
       $last = $last + $a['resolution'];
     }
+    // If the last time is the same as or before the start time, then it's 
really on the next day
+    if ($first >= $last)
+    {
+      $last += 24*60*60;
+    }
     $start_last = ($a['enable_periods']) ? $last : $last - $a['resolution'];
     $display_none = ($a['id'] != $area_id);
+
     genSlotSelector($a, "start_", $first, $start_last, $current_s, 
$display_none, $disabled);
     
     echo "<div class=\"group\">\n";
@@ -312,6 +312,11 @@
       $last = (($a['eveningends'] * 60) + $a['eveningends_minutes']) * 60;
       $last = $last + $a['resolution'];
     }
+    // If the last time is the same as or before the start time, then it's 
really on the next day
+    if ($first >= $last)
+    {
+      $last += 24*60*60;
+    }
     $end_value = (($date['hours'] * 60) + $date['minutes']) * 60;
     $end_value = ($a['enable_periods']) ? $end_value - $a['resolution'] : 
$end_value;
     $display_none = ($a['id'] != $area_id);
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to