Revision: 2991
https://sourceforge.net/p/mrbs/code/2991/
Author: cimorrison
Date: 2015-01-28 16:15:13 +0000 (Wed, 28 Jan 2015)
Log Message:
-----------
Renamed function to get rid of an upper-case 'I' and so avoid possible problems
in a Turkish locale
Modified Paths:
--------------
mrbs/trunk/web/functions.inc
mrbs/trunk/web/report.php
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2015-01-28 16:07:08 UTC (rev 2990)
+++ mrbs/trunk/web/functions.inc 2015-01-28 16:15:13 UTC (rev 2991)
@@ -307,7 +307,7 @@
// Gets the interval in periods for a booking with $start_time and $end_time
// Takes account of DST
-function getPeriodInterval($start_time, $end_time)
+function get_period_interval($start_time, $end_time)
{
global $periods;
@@ -340,11 +340,11 @@
{
// Otherwise we calculate the number of periods on the first day
$startDate->add(new DateInterval('PT' . $periods_per_day . 'M'));
- $result = getPeriodInterval($start_time, $startDate->getTimestamp());
+ $result = get_period_interval($start_time, $startDate->getTimestamp());
// Add in the number of whole days worth of periods in between
$result += ($interval_days - 1) * $periods_per_day;
// And add in the number of periods on the last day
- $result += getPeriodInterval($endDate->getTimestamp(), $end_time);
+ $result += get_period_interval($endDate->getTimestamp(), $end_time);
}
return (int)$result;
@@ -574,7 +574,7 @@
if ($enable_periods)
{
$periods_per_day = count($periods);
- $n_periods = getPeriodInterval($start_time, $end_time); // this handles
DST
+ $n_periods = get_period_interval($start_time, $end_time); // this handles
DST
if (($n_periods % $periods_per_day) == 0)
{
$result['duration'] = intval($n_periods/$periods_per_day);
Modified: mrbs/trunk/web/report.php
===================================================================
--- mrbs/trunk/web/report.php 2015-01-28 16:07:08 UTC (rev 2990)
+++ mrbs/trunk/web/report.php 2015-01-28 16:15:13 UTC (rev 2991)
@@ -888,8 +888,8 @@
$endDate->sub(new DateInterval('P1D')); // Go back one day because the
$report_end is at 00:00 the day after
$endDate->add(new DateInterval('PT' . $periods_per_day . 'M'));
- $increment = getPeriodInterval(max($row['start_time'],
$startDate->getTimestamp()),
- min($row['end_time'],
$endDate->getTimestamp()));
+ $increment = get_period_interval(max($row['start_time'],
$startDate->getTimestamp()),
+ min($row['end_time'],
$endDate->getTimestamp()));
$room_hash[$room] = MODE_PERIODS;
}
else
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits