Revision: 2213
http://mrbs.svn.sourceforge.net/mrbs/?rev=2213&view=rev
Author: cimorrison
Date: 2011-12-28 21:22:35 +0000 (Wed, 28 Dec 2011)
Log Message:
-----------
Fixed another instance of date() being called before the timezone had been set,
resulting in PHP warning
Modified Paths:
--------------
mrbs/trunk/web/Themes/default/header.inc
mrbs/trunk/web/functions.inc
Modified: mrbs/trunk/web/Themes/default/header.inc
===================================================================
--- mrbs/trunk/web/Themes/default/header.inc 2011-12-28 17:12:49 UTC (rev
2212)
+++ mrbs/trunk/web/Themes/default/header.inc 2011-12-28 21:22:35 UTC (rev
2213)
@@ -85,6 +85,9 @@
$page = basename($PHP_SELF, ".php");
$user = getUserName();
$is_admin = (authGetUserLevel($user) >= $max_level);
+
+ // Need to set the timezone before we can use date()
+ get_area_settings($area);
// If we dont know the right date then make it up
if (!$day)
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2011-12-28 17:12:49 UTC (rev 2212)
+++ mrbs/trunk/web/functions.inc 2011-12-28 21:22:35 UTC (rev 2213)
@@ -722,7 +722,8 @@
}
// Update the default area settings with the ones specific to this area.
-// If no value is set in the database, use the value from the config file
+// If no value is set in the database, use the value from the config file.
+// If $area is empty, use the default area
function get_area_settings($area)
{
global $tbl_area, $force_resolution;
@@ -734,6 +735,11 @@
global $confirmation_enabled, $confirmed_default, $timezone;
global $private_override_options;
+ if (empty($area))
+ {
+ $area = get_default_area();
+ }
+
// Get all the "per area" config settings
$sql = "SELECT timezone, resolution, default_duration,
default_duration_all_day,
morningstarts, morningstarts_minutes,
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits