Changeset:
58243e4763ec
https://sourceforge.net/p/mrbs/hg-code/ci/58243e4763ec47da0e1289bc37c199cdae642182
Author:
Campbell Morrison <[email protected]>
Date:
Tue Jul 19 12:28:59 2016 +0100
Log message:
Fixed problem with the endtime selector not having a selected value in the very
rare case that the area's morningstarts or resolution is changed in between
refreshes of the browser on the edit_entry page. See also SF Support Requests
#983.
diffstat:
web/edit_entry.php | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diffs (20 lines):
diff -r 1d716f2ddafa -r 58243e4763ec web/edit_entry.php
--- a/web/edit_entry.php Thu Jul 14 13:38:43 2016 +0100
+++ b/web/edit_entry.php Tue Jul 19 12:28:59 2016 +0100
@@ -928,6 +928,16 @@
}
$start_time = mktime($hour, $minute, 0, $month, $day, $year);
+
+ // If the start time is not on a slot boundary, then make it so. (It's just
possible that it won't be
+ // if (a) somebody messes with the query string or (b) somebody changes
morningstarts or the
+ // resolution in another browser window and then this page is refreshed with
the same query string).
+ $start_first_slot = get_start_first_slot($month, $day, $year);
+ $start_time = max($start_first_slot, $start_time);
+ if (($start_time - $start_first_slot)%$resolution != 0)
+ {
+ $start_time = $start_first_slot + intval(($start_time -
$start_first_slot)/$resolution); // rounds down
+ }
if (isset($end_seconds))
{
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits