summaryrefslogtreecommitdiff
path: root/thumb.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
commit370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch)
tree491674f4c242e4d6ba0d04eafa305174c35a3391 /thumb.php
parentf4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff)
Update auf 1.13.0
Diffstat (limited to 'thumb.php')
-rw-r--r--thumb.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/thumb.php b/thumb.php
index 62c33820..677979a0 100644
--- a/thumb.php
+++ b/thumb.php
@@ -3,7 +3,8 @@
/**
* PHP script to stream out an image thumbnail.
*
- * @addtogroup Media
+ * @file
+ * @ingroup Media
*/
define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
require_once( './includes/WebStart.php' );
@@ -116,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 ) {
@@ -123,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 = "<!-- $url -->\n<!-- $hostname -->\n";
+ } else {
+ $debug = "";
+ }
echo <<<EOT
<html><head><title>Error generating thumbnail</title></head>
<body>
@@ -130,6 +139,7 @@ function wfThumbError( $status, $msg ) {
<p>
$msg
</p>
+$debug
</body>
</html>