Revision: 1172
http://mrbs.svn.sourceforge.net/mrbs/?rev=1172&view=rev
Author: cimorrison
Date: 2009-08-11 14:05:50 +0000 (Tue, 11 Aug 2009)
Log Message:
-----------
Moved consistency checking of user settings for periods and time slots out of
systemdefaults.inc.php where it is now unnecessary (because
systemdefaults.inc.php cannot be changed by the user) and put it into theme.inc.
Modified Paths:
--------------
mrbs/trunk/web/systemdefaults.inc.php
mrbs/trunk/web/theme.inc
Modified: mrbs/trunk/web/systemdefaults.inc.php
===================================================================
--- mrbs/trunk/web/systemdefaults.inc.php 2009-08-11 12:33:38 UTC (rev
1171)
+++ mrbs/trunk/web/systemdefaults.inc.php 2009-08-11 14:05:50 UTC (rev
1172)
@@ -205,29 +205,6 @@
// NOTE: The maximum number of periods is 60. Do not define more than this.
-// CHECKING
-// --------
-
-// Do some checking (and redefine $max_slots if we're using periods)
-if ($enable_periods)
-{
- $max_slots = count($periods); // We know exactly how many we need
- if ($max_slots > 60)
- {
- die('Configuration error: too many periods defined');
- }
-}
-else
-{
- $start_first_slot = ($morningstarts*60) + $morningstarts_minutes; //
minutes
- $start_last_slot = ($eveningends*60) + $eveningends_minutes; //
minutes
- $start_difference = ($start_last_slot - $start_first_slot) * 60; //
seconds
- if (($start_difference < 0) or ($start_difference%$resolution != 0))
- {
- die('Configuration error: start and end of day incorrectly defined');
- }
-}
-
/******************
* Display settings
******************/
Modified: mrbs/trunk/web/theme.inc
===================================================================
--- mrbs/trunk/web/theme.inc 2009-08-11 12:33:38 UTC (rev 1171)
+++ mrbs/trunk/web/theme.inc 2009-08-11 14:05:50 UTC (rev 1172)
@@ -10,4 +10,24 @@
require_once "Themes/default/styling.inc";
@include_once "Themes/$theme/styling.inc"; // overwrite the default with the
specified styling if it exists
+// Do some consistency checking of user settings from config.inc.php
+// (and redefine $max_slots if we're using periods)
+if ($enable_periods)
+{
+ $max_slots = count($periods); // We know exactly how many we need
+ if (count($periods) > 60)
+ {
+ die('Configuration error: too many periods defined');
+ }
+}
+else
+{
+ $start_first_slot = ($morningstarts*60) + $morningstarts_minutes; //
minutes
+ $start_last_slot = ($eveningends*60) + $eveningends_minutes; //
minutes
+ $start_difference = ($start_last_slot - $start_first_slot) * 60; //
seconds
+ if (($start_difference < 0) or ($start_difference%$resolution != 0))
+ {
+ die('Configuration error: start and end of day incorrectly defined');
+ }
+}
?>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits