Revision: 2026
http://mrbs.svn.sourceforge.net/mrbs/?rev=2026&view=rev
Author: cimorrison
Date: 2011-09-29 16:27:45 +0000 (Thu, 29 Sep 2011)
Log Message:
-----------
Added a sanity check to check that 'private_override' is one of the three valid
values in case the database has somehow got messed up
Modified Paths:
--------------
mrbs/trunk/web/functions.inc
mrbs/trunk/web/internalconfig.inc.php
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2011-09-29 16:06:43 UTC (rev 2025)
+++ mrbs/trunk/web/functions.inc 2011-09-29 16:27:45 UTC (rev 2026)
@@ -708,6 +708,7 @@
global $min_book_ahead_enabled, $max_book_ahead_enabled,
$min_book_ahead_secs, $max_book_ahead_secs;
global $approval_enabled, $reminders_enabled, $enable_periods,
$boolean_fields;
global $confirmation_enabled, $confirmed_default;
+ global $private_override_options;
// Get all the "per area" config settings
$sql = "SELECT resolution, default_duration, default_duration_all_day,
@@ -746,6 +747,13 @@
}
}
}
+ // Do some sanity checking in case the area table is somehow messed up
+ if (!in_array($private_override, $private_override_options))
+ {
+ $private_override = 'private'; // the safest default
+ $message = "Invalid value for 'private_override' in the area table. Using
'private'.";
+ trigger_error($message, E_USER_WARNING);
+ }
}
// generate the predicate for use in an SQL query to test whether
Modified: mrbs/trunk/web/internalconfig.inc.php
===================================================================
--- mrbs/trunk/web/internalconfig.inc.php 2011-09-29 16:06:43 UTC (rev
2025)
+++ mrbs/trunk/web/internalconfig.inc.php 2011-09-29 16:27:45 UTC (rev
2026)
@@ -215,6 +215,9 @@
'enable_periods',
'confirmation_enabled',
'confirmed_default');
+
+// Permitted values for 'private_override'
+$private_override_options = array('none', 'public', 'private');
/********************************************************
* Miscellaneous
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits