Changeset:
6c4f074c6d3e
https://sourceforge.net/p/mrbs/hg-code/ci/6c4f074c6d3ebbcd1392b9d89f008fb8d2ce296f
Author:
Campbell Morrison <[email protected]>
Date:
Wed Apr 12 08:04:40 2017 +0100
Log message:
Added handling for null values of periods
diffstat:
web/functions.inc | 13 +++++++++----
web/internalconfig.inc.php | 1 +
2 files changed, 10 insertions(+), 4 deletions(-)
diffs (41 lines):
diff -r 3f616956f135 -r 6c4f074c6d3e web/functions.inc
--- a/web/functions.inc Tue Apr 11 19:06:56 2017 +0100
+++ b/web/functions.inc Wed Apr 12 08:04:40 2017 +0100
@@ -1996,7 +1996,15 @@
}
else
{
- $row = clean_area_row($res->row_keyed(0));
+ $row = $res->row_keyed(0);
+
+ // Periods are stored as a JSON encoded string in the database
+ if (isset($row['periods']))
+ {
+ $row['periods'] = json_decode($row['periods']);
+ }
+
+ $row = clean_area_row($row);
foreach ($columns as $column)
{
if (array_key_exists($column, $row))
@@ -2025,9 +2033,6 @@
}
}
- // Periods are stored as a JSON encoded string in the database
- $periods = json_decode($periods);
-
// If we're using periods then set the resolution to 60 seconds
if ($enable_periods)
{
diff -r 3f616956f135 -r 6c4f074c6d3e web/internalconfig.inc.php
--- a/web/internalconfig.inc.php Tue Apr 11 19:06:56 2017 +0100
+++ b/web/internalconfig.inc.php Wed Apr 12 08:04:40 2017 +0100
@@ -438,6 +438,7 @@
'approval_enabled',
'reminders_enabled',
'enable_periods',
+ 'periods',
'confirmation_enabled',
'confirmed_default');
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits