From 95b4aef2dc89bbfc728a2b6df317e5f9dd2b0afe Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 19 Jun 2008 23:22:03 +0000 Subject: [PATCH] replace live hack: include debug info in thumb.php (switch it in with $wgShowHostnames) --- thumb.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/thumb.php b/thumb.php index a273393d33..677979a0f4 100644 --- a/thumb.php +++ b/thumb.php @@ -117,6 +117,7 @@ function wfThumbMain() { } function wfThumbError( $status, $msg ) { + global $wgShowHostnames; header( 'Cache-Control: no-cache' ); header( 'Content-Type: text/html; charset=utf-8' ); if ( $status == 404 ) { @@ -124,6 +125,13 @@ function wfThumbError( $status, $msg ) { } else { header( 'HTTP/1.1 500 Internal server error' ); } + if( $wgShowHostnames ) { + $url = htmlspecialchars( @$_SERVER['REQUEST_URI'] ); + $hostname = htmlspecialchars( wfHostname() ); + $debug = "\n\n"; + } else { + $debug = ""; + } echo <<Error generating thumbnail @@ -131,6 +139,7 @@ function wfThumbError( $status, $msg ) {

$msg

+$debug -- 2.20.1