Possible fixes for view.php redirect
authorRoland Häder <roland@mxchange.org>
Sun, 6 Dec 2009 14:30:15 +0000 (14:30 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 6 Dec 2009 14:30:15 +0000 (14:30 +0000)
inc/functions.php
view.php

index aec4292947292056a13ef0e07a90f79f041aee33..ee75b3a0d2c0e3c098b30175aad2cc8e380061b6 100644 (file)
@@ -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)) {
index d708dff0212c2ceb4220bc6f7adaf3507d2233f9..9a7e2f7524f3509fb0cdd93c6f1c1a019300a80e 100644 (file)
--- 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');