]> git.mxchange.org Git - mailer.git/commitdiff
Better encapsulate this a little ...
authorRoland Häder <roland@mxchange.org>
Wed, 9 Nov 2011 07:19:36 +0000 (07:19 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 9 Nov 2011 07:19:36 +0000 (07:19 +0000)
inc/functions.php
inc/wrapper-functions.php

index 4e1579b587836adbddf46bb27cda9bff22311569..90f2b6d378b37e83312dd7bfb9c70e7e7a4fe79f 100644 (file)
@@ -564,15 +564,6 @@ function redirectToUrl ($url, $allowSpider = true) {
 
        // We should not sent a redirect if headers are already sent
        if (!headers_sent()) {
-               // Clear output buffer
-               clearOutputBuffer();
-
-               // Clear own output buffer
-               $GLOBALS['output'] = '';
-
-               // To make redirects working (no content type), output mode must be raw
-               setOutputMode(-1);
-
                // Load URL when headers are not sent
                sendRawRedirect(doFinalCompilation(str_replace('&amp;', '&', $url), false));
        } else {
index 8c0836316486a227df6a3822639ac01baf771a84..c86787ebc2aa0b1bd191896f4dd6b9c1fe288806 100644 (file)
@@ -1108,6 +1108,15 @@ function getHttpStatus () {
  * @access  private
  */
 function sendRawRedirect ($url) {
+       // Clear output buffer
+       clearOutputBuffer();
+
+       // Clear own output buffer
+       $GLOBALS['output'] = '';
+
+       // To make redirects working (no content type), output mode must be raw
+       setOutputMode(-1);
+
        // Send helping header
        setHttpStatus('302 Found');