Changeset:
c2cdf4dbf622
https://sourceforge.net/p/mrbs/hg-code/ci/c2cdf4dbf622382f1d75e51b46c0102d6d7f78cd
Author:
Campbell Morrison <[email protected]>
Date:
Thu Oct 06 17:07:28 2016 +0100
Log message:
Further fix to get_area_settings()
diffstat:
web/functions.inc | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diffs (36 lines):
diff -r 92ba2d81490d -r c2cdf4dbf622 web/functions.inc
--- a/web/functions.inc Thu Oct 06 16:59:54 2016 +0100
+++ b/web/functions.inc Thu Oct 06 17:07:28 2016 +0100
@@ -1698,18 +1698,21 @@
foreach ($row as $key => $value)
{
- // If the "per area" setting is in the database, then use that. Otherwise
- // just stick with the default setting from the config file.
- // (don't use the database setting if $force_resolution is TRUE
- // and we're looking at the resolution field)
- if (($key != 'resolution') || empty($force_resolution))
+ if (array_key_exists($key, $area_defaults))
{
- $row[$key] = (isset($row[$key])) ? $value : $area_defaults[$key];
- }
- // Cast those fields which are booleans into booleans
- if (in_array($key, $boolean_fields['area']))
- {
- $row[$key] = (bool) $row[$key];
+ // If the "per area" setting is in the database, then use that.
Otherwise
+ // just stick with the default setting from the config file.
+ // (don't use the database setting if $force_resolution is TRUE
+ // and we're looking at the resolution field)
+ if (($key != 'resolution') || empty($force_resolution))
+ {
+ $row[$key] = (isset($row[$key])) ? $value : $area_defaults[$key];
+ }
+ // Cast those fields which are booleans into booleans
+ if (in_array($key, $boolean_fields['area']))
+ {
+ $row[$key] = (bool) $row[$key];
+ }
}
}
// Do some sanity checking in case the area table is somehow messed up
------------------------------------------------------------------------------
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