Changeset:
        f35a17b2b760
        
https://sourceforge.net/p/mrbs/hg-code/ci/f35a17b2b760bd5c754e2b7ca6500eb24b82caef
Author:
        Campbell Morrison <[email protected]>
Date:
        Sun Mar 05 15:55:04 2017 +0000
Log message:

Restructured

diffstat:

 web/Themes/default/header.inc |  28 +---------------------------
 web/functions.inc             |  26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 27 deletions(-)

diffs (75 lines):

diff -r 13d639904fc0 -r f35a17b2b760 web/Themes/default/header.inc
--- a/web/Themes/default/header.inc     Sun Mar 05 15:43:01 2017 +0000
+++ b/web/Themes/default/header.inc     Sun Mar 05 15:55:04 2017 +0000
@@ -205,34 +205,8 @@
 // Print the page header
 // If $simple is true, then just print a simple header that doesn't require 
any database
 // access or JavaScript (useful for fatal errors and database upgrades).
-function print_theme_header($day, $month, $year, $area, $room, $simple=false, 
$search_str)
+function print_theme_header($day, $month, $year, $area, $room, $simple=false, 
$search_str='')
 {
-  // Need to set the timezone before we can use date()
-  if ($simple)
-  {
-    // We don't really care what timezone is being used
-    mrbs_default_timezone_set();
-  }
-  else
-  {
-    // This will set the correct timezone for the area
-    get_area_settings($area);  
-  }
-
-  // If we dont know the right date then make it up 
-  if (!$day)
-  {
-    $day   = date("d");
-  }
-  if (!$month)
-  {
-    $month = date("m");
-  }
-  if (!$year)
-  {
-    $year  = date("Y");
-  }
-
   // We want to prevent IE8 offering "Compatibility View" as that really
   // messes up MRBS, especially on the Report page
   $headers = array("Content-Type: text/html; charset=" . get_charset(),
diff -r 13d639904fc0 -r f35a17b2b760 web/functions.inc
--- a/web/functions.inc Sun Mar 05 15:43:01 2017 +0000
+++ b/web/functions.inc Sun Mar 05 15:55:04 2017 +0000
@@ -186,6 +186,32 @@
     return;
   }
   
+  // Need to set the timezone before we can use date()
+  if ($simple)
+  {
+    // We don't really care what timezone is being used
+    mrbs_default_timezone_set();
+  }
+  else
+  {
+    // This will set the correct timezone for the area
+    get_area_settings($area);  
+  }
+
+  // If we dont know the right date then make it up 
+  if (!$day)
+  {
+    $day   = date("d");
+  }
+  if (!$month)
+  {
+    $month = date("m");
+  }
+  if (!$year)
+  {
+    $year  = date("Y");
+  }
+  
   // Load the print_theme_header function appropriate to the theme.    If there
   // isn't one then fall back to the default header.
   if (is_readable("Themes/$theme/header.inc"))

------------------------------------------------------------------------------
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

Reply via email to