Fixes for missing array elements
authorRoland Häder <roland@mxchange.org>
Mon, 30 Nov 2009 17:15:11 +0000 (17:15 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 30 Nov 2009 17:15:11 +0000 (17:15 +0000)
inc/functions.php

index b61e863c5c92b49555f5040b6d994438084ab582..9e185ab1b51e0fd9b19663aaf5f5f43d39d56560 100644 (file)
@@ -945,6 +945,9 @@ function redirectToUrl ($URL) {
                // Secure the URL against bad things such als HTML insertions and so on...
                $URL = secureString($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('<a href="' . $URL . '"' . $rel . '>' . $URL . '</a>');
        } elseif (!headers_sent()) {
                // Output new location link as anchor
                outputHtml('<a href="' . $URL . '"' . $rel . '>' . $URL . '</a>');
        } elseif (!headers_sent()) {
@@ -3963,8 +3966,17 @@ function loadHtmlHeader () {
 
 // Adds page header and footer to output array element
 function addPageHeaderFooter () {
 
 // Adds page header and footer to output array element
 function addPageHeaderFooter () {
+       // Init output
+       $OUT = '';
+
        // Add them all together. This is maybe to simple
        // 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
 }
 
 // Generates meta description for current module and 'what' value