From: Roland Häder Date: Thu, 5 Nov 2009 19:47:08 +0000 (+0000) Subject: Fixes for redirection problem X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=60cf1781cd7afe5f80db3587d427a72409befea6 Fixes for redirection problem --- diff --git a/inc/functions.php b/inc/functions.php index 25cb94adb1..36e2dca25c 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -978,8 +978,11 @@ function redirectToUrl ($URL) { // Output new location link as anchor outputHtml('' . $URL . ''); } elseif (!headers_sent()) { - // Load URL when headers are not sent //* DEBUG: */ debug_report_bug("URL={$URL}"); + // Clear own output buffer + $GLOBALS['output'] = ''; + + // Load URL when headers are not sent sendHeader('Location: '.str_replace('&', '&', $URL)); } else { // Output error message diff --git a/index.php b/index.php index f576059535..040678bcea 100644 --- a/index.php +++ b/index.php @@ -63,7 +63,7 @@ if (!isConfigEntrySet('index_delay')) setConfigEntry('index_delay' , 0); if (!isConfigEntrySet('index_cookie')) setConfigEntry('index_cookie', 0); // Check for cookies -if ((isSessionVariableSet('visited')) || (getConfig('index_delay') > 0)) { +if ((isSessionVariableSet('visited')) || (getConfig('index_delay') > -1)) { // Is the index page configured for redirect pr not? if (getConfig('index_cookie') > 0) { // Set cookie and remeber it for specified time