Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php |
— | — | @@ -312,14 +312,12 @@ |
313 | 313 | return $this->doThumbError( $params, $error ); |
314 | 314 | } |
315 | 315 | |
316 | | - if ( is_file( $dstPath ) ) { |
317 | | - return new ThumbnailImage( $image, $dstUrl, $width, |
318 | | - $height, $dstPath, $page ); |
319 | | - } |
320 | | - |
321 | 316 | if ( !wfMkdirParents( dirname( $dstPath ), null, __METHOD__ ) ) |
322 | 317 | return $this->doThumbError( $params, 'thumbnail_dest_directory' ); |
323 | 318 | |
| 319 | + // Get local copy source for shell scripts |
| 320 | + $srcPath = $image->getLocalRefPath(); |
| 321 | + |
324 | 322 | if ( $wgTiffUseVips ) { |
325 | 323 | $pagesize = PagedTiffImage::getPageSize($meta, $page); |
326 | 324 | if ( !$pagesize ) { |
— | — | @@ -332,9 +330,6 @@ |
333 | 331 | if ( ( $width * $height ) > $wgMaxImageAreaForVips ) |
334 | 332 | return $this->doThumbError( $params, 'tiff_targetfile_too_large' ); |
335 | 333 | |
336 | | - // Get local copy source for shell scripts |
337 | | - $srcPath = $image->getLocalRefPath(); |
338 | | - |
339 | 334 | // Shrink factors must be > 1. |
340 | 335 | if ( ( $pagesize['width'] > $width ) && ( $pagesize['height'] > $height ) ) { |
341 | 336 | $xfac = $pagesize['width'] / $width; |