From 25cfdf73de200b6ae57a47960bc3100e4aba3c7b Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 8 Apr 2013 12:21:28 +0200 Subject: indexer.php: disable the GIF output only with debug parameter and allowdebug Before this fix the debug parameter always prevent the GIF from being sent even though no actual debug information was returned unless the allowdebug configuration option was set. Now the GIF is only disabled if debugging is actually allowed. --- lib/exe/indexer.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 27576f76d..57bee8925 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -16,15 +16,16 @@ if(!defined('NL')) define('NL',"\n"); // check if user abort worked, if yes send output early $defer = !@ignore_user_abort() || $conf['broken_iua']; -if(!$defer){ +$output = $INPUT->has('debug') && $conf['allowdebug']; +if(!$defer && !$output){ sendGIF(); // send gif } $ID = cleanID($INPUT->str('id')); // Catch any possible output (e.g. errors) -$output = $INPUT->has('debug') && $conf['allowdebug']; if(!$output) ob_start(); +else header('Content-Type: text/plain'); // run one of the jobs $tmp = array(); // No event data @@ -192,11 +193,6 @@ function sendDigest() { * @author Harry Fuecks */ function sendGIF(){ - global $INPUT; - if($INPUT->has('debug')){ - header('Content-Type: text/plain'); - return; - } $img = base64_decode('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAEALAAAAAABAAEAAAIBTAA7'); header('Content-Type: image/gif'); header('Content-Length: '.strlen($img)); -- cgit v1.2.3