Simplify watchlist edit mode handling
[lhc/web/wiklou.git] / thumb.php
index bb9c4d6..4ffefb6 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -425,7 +425,7 @@ function wfExtractThumbParams( $file, $params ) {
        if ( $handler && $fileNamePos !== false ) {
                $paramString = substr( $thumbname, 0, $fileNamePos - 1 );
                $extraParams = $handler->parseParamString( $paramString );
-               if ( $handler !== false ) {
+               if ( $extraParams !== false ) {
                        return $params + $extraParams;
                }
        }
@@ -463,6 +463,7 @@ function wfThumbError( $status, $msg ) {
                header( 'HTTP/1.1 500 Internal server error' );
        }
        if ( $wgShowHostnames ) {
+               header( 'X-MW-Thumbnail-Renderer: ' . wfHostname() );
                $url = htmlspecialchars( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '' );
                $hostname = htmlspecialchars( wfHostname() );
                $debug = "<!-- $url -->\n<!-- $hostname -->\n";