From: Roland Häder Date: Sun, 6 Dec 2009 14:30:15 +0000 (+0000) Subject: Possible fixes for view.php redirect X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0366eb054abf51874a4272fc9b89673af1fb793b;p=mailer.git Possible fixes for view.php redirect --- diff --git a/inc/functions.php b/inc/functions.php index aec4292947..ee75b3a0d2 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3911,8 +3911,8 @@ function getModuleFromFileName ($file, $accessLevel) { // Encodes an URL for adding session id, etc. function encodeUrl ($url, $outputMode = '0') { - // Do we have already have a PHPSESSID inside? Then it is already converted... - if (strpos($url, session_name()) !== false) return $url; + // Do we have already have a PHPSESSID inside or view.php is called? Then abort here + if ((strpos($url, session_name()) !== false) || (getOutputMode() == -3)) return $url; // Do we have a valid session? if (((!isset($GLOBALS['valid_session'])) || ($GLOBALS['valid_session'] === false) || (!isset($_COOKIE[session_name()]))) && (isSpider() === false)) { diff --git a/view.php b/view.php index d708dff021..9a7e2f7524 100644 --- a/view.php +++ b/view.php @@ -41,7 +41,7 @@ require('inc/libs/security_functions.php'); // Set module $GLOBALS['module'] = 'view'; -$GLOBALS['output_mode'] = -1; +$GLOBALS['output_mode'] = -3; // Load the required file(s) require('inc/config-global.php');