X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=9e185ab1b51e0fd9b19663aaf5f5f43d39d56560;hp=b61e863c5c92b49555f5040b6d994438084ab582;hb=5faa2f01095c717ee2544716026ea414ed0b15ee;hpb=27d3ef2b2af55933a48294ff9bc9750fdbe050eb 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