return;
}
+ $user = RequestContext::getMain()->getUser();
+ if ( $user->pingLimiter( 'renderfile' ) ) {
+ wfThumbError( 500, wfMessage( 'actionthrottledtext' ) );
+ return;
+ }
+
// Thumbnail isn't already there, so create the new thumbnail...
try {
$thumb = $img->transform( $params, File::RENDER_NOW );
if ( $handler && $fileNamePos !== false ) {
$paramString = substr( $thumbname, 0, $fileNamePos - 1 );
$extraParams = $handler->parseParamString( $paramString );
- if ( $handler !== false ) {
+ if ( $extraParams !== false ) {
return $params + $extraParams;
}
}
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";