Fixed Job constructor IDE notices about variable types
[lhc/web/wiklou.git] / includes / jobqueue / jobs / ThumbnailRenderJob.php
index dbc4f23..a58fa8b 100644 (file)
@@ -27,7 +27,7 @@
  * @ingroup JobQueue
  */
 class ThumbnailRenderJob extends Job {
-       public function __construct( $title, $params ) {
+       public function __construct( Title $title, array $params ) {
                parent::__construct( 'ThumbnailRender', $title, $params );
        }
 
@@ -37,6 +37,7 @@ class ThumbnailRenderJob extends Job {
                $transformParams = $this->params['transformParams'];
 
                $file = wfLocalFile( $this->title );
+               $file->load( File::READ_LATEST );
 
                if ( $file && $file->exists() ) {
                        if ( $wgUploadThumbnailRenderMethod === 'jobqueue' ) {
@@ -92,9 +93,10 @@ class ThumbnailRenderJob extends Job {
 
                wfDebug( __METHOD__ . ": hitting url {$thumbUrl}\n" );
 
-               $request = MWHttpRequest::factory( $thumbUrl, array(
-                       'method' => 'HEAD',
-                       'followRedirects' => true ) );
+               $request = MWHttpRequest::factory( $thumbUrl,
+                       array( 'method' => 'HEAD', 'followRedirects' => true ),
+                       __METHOD__
+               );
 
                if ( $wgUploadThumbnailRenderHttpCustomHost ) {
                        $request->setHeader( 'Host', $wgUploadThumbnailRenderHttpCustomHost );