Changeset:
935236324e75
https://sourceforge.net/p/mrbs/hg-code/ci/935236324e75464fef9f26338a78334c45c2b72c
Author:
Campbell Morrison <[email protected]>
Date:
Sun Oct 02 15:29:57 2016 +0100
Log message:
Made $done_header a static variable
diffstat:
web/functions.inc | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r 226b9bca3de5 -r 935236324e75 web/functions.inc
--- a/web/functions.inc Sun Oct 02 15:23:25 2016 +0100
+++ b/web/functions.inc Sun Oct 02 15:29:57 2016 +0100
@@ -103,8 +103,6 @@
$private_default=FALSE;
}
-$done_header = FALSE;
-
// Outputs the HTTP headers
function http_headers()
@@ -130,7 +128,9 @@
// Print the page header
function print_header($day, $month, $year, $area, $room, $simple=false)
{
- global $theme, $done_header;
+ global $theme;
+
+ static $done_header = false;
if ($done_header)
{
@@ -147,13 +147,14 @@
{
require_once "Themes/default/header.inc";
}
+
// Now go and do it
print_theme_header($day, $month, $year, $area, $room, $simple);
- $done_header = TRUE;
+
+ $done_header = true;
}
-
// Print the standard footer, currently very simple. Pass $and_exit as
// TRUE to exit afterwards
function print_footer($and_exit)
------------------------------------------------------------------------------
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