Revision: 2695
https://sourceforge.net/p/mrbs/code/2695/
Author: cimorrison
Date: 2013-02-14 10:51:14 +0000 (Thu, 14 Feb 2013)
Log Message:
-----------
Fixed bug causing incorrect checking of resolution and number of slots when the
booking day stretches past midnight.
Modified Paths:
--------------
mrbs/trunk/web/edit_area_room.php
mrbs/trunk/web/internalconfig.inc.php
Modified: mrbs/trunk/web/edit_area_room.php
===================================================================
--- mrbs/trunk/web/edit_area_room.php 2013-02-11 08:51:49 UTC (rev 2694)
+++ mrbs/trunk/web/edit_area_room.php 2013-02-14 10:51:14 UTC (rev 2695)
@@ -472,9 +472,10 @@
else
{
// 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
+ // 1 Jan 2000 chosen to be a date free of DST changes
+ $start_first_slot = get_start_first_slot(1, 1, 2000);
+ $start_last_slot = get_start_last_slot(1, 1, 2000);
+ $start_difference = ($start_last_slot - $start_first_slot)/60;
// minutes
if ($start_difference%$area_res_mins != 0)
{
$valid_resolution = FALSE;
Modified: mrbs/trunk/web/internalconfig.inc.php
===================================================================
--- mrbs/trunk/web/internalconfig.inc.php 2013-02-11 08:51:49 UTC (rev
2694)
+++ mrbs/trunk/web/internalconfig.inc.php 2013-02-14 10:51:14 UTC (rev
2695)
@@ -71,9 +71,9 @@
{
die('Configuration error: $resolution is not an integral number of
minutes.');
}
- $start_first_slot = ($morningstarts*60) + $morningstarts_minutes; //
minutes
- $start_last_slot = ($eveningends*60) + $eveningends_minutes; //
minutes
- $start_difference = ($start_last_slot - $start_first_slot) * 60; //
seconds
+ $start_first_slot = get_start_first_slot(1, 1, 2000); // 1 Jan 2000 free of
DST changes
+ $start_last_slot = get_start_last_slot(1, 1, 2000);
+ $start_difference = $start_last_slot - $start_first_slot; // seconds
if ($start_difference%$resolution != 0)
{
die('Configuration error: make sure that the length of the booking day is
an integral multiple of $resolution.');
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits