From 5faa2f01095c717ee2544716026ea414ed0b15ee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 30 Nov 2009 17:15:11 +0000 Subject: [PATCH] Fixes for missing array elements --- inc/functions.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index b61e863c5c..9e185ab1b5 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -945,6 +945,9 @@ function redirectToUrl ($URL) { // Secure the URL against bad things such als HTML insertions and so on... $URL = secureString($URL); + // Set content-type here to fix a missing array element + setContentType('text/html'); + // Output new location link as anchor outputHtml('' . $URL . ''); } elseif (!headers_sent()) { @@ -3963,8 +3966,17 @@ function loadHtmlHeader () { // Adds page header and footer to output array element function addPageHeaderFooter () { + // Init output + $OUT = ''; + // Add them all together. This is maybe to simple - $GLOBALS['output'] = $GLOBALS['page_header'] . $GLOBALS['output'] . $GLOBALS['page_footer']; + foreach (array('page_header', 'output', 'page_footer') as $pagePart) { + // Add page part if set + if (isset($GLOBALS[$pagePart]])) $OUT .= $GLOBALS[$pagePart]; + } // END - foreach + + // Transfer $OUT to 'output' + $GLOBALS['output'] = $OUT; } // Generates meta description for current module and 'what' value -- 2.39.5