r112616 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112615‎ | r112616 | r112617 >
Date:17:37, 28 February 2012
Author:aaron
Status:ok
Tags:
Comment:
Ported r112615 from 1.19wmf:
* Fixed stupid bug in r112613 where the var was defined only for the vips code branch.
* Removed is_file() check since a temp file is always there and File/thumb.php is supposed to handle this kind of check anyway.
Modified paths:
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php
@@ -312,14 +312,12 @@
313313 return $this->doThumbError( $params, $error );
314314 }
315315
316 - if ( is_file( $dstPath ) ) {
317 - return new ThumbnailImage( $image, $dstUrl, $width,
318 - $height, $dstPath, $page );
319 - }
320 -
321316 if ( !wfMkdirParents( dirname( $dstPath ), null, __METHOD__ ) )
322317 return $this->doThumbError( $params, 'thumbnail_dest_directory' );
323318
 319+ // Get local copy source for shell scripts
 320+ $srcPath = $image->getLocalRefPath();
 321+
324322 if ( $wgTiffUseVips ) {
325323 $pagesize = PagedTiffImage::getPageSize($meta, $page);
326324 if ( !$pagesize ) {
@@ -332,9 +330,6 @@
333331 if ( ( $width * $height ) > $wgMaxImageAreaForVips )
334332 return $this->doThumbError( $params, 'tiff_targetfile_too_large' );
335333
336 - // Get local copy source for shell scripts
337 - $srcPath = $image->getLocalRefPath();
338 -
339334 // Shrink factors must be > 1.
340335 if ( ( $pagesize['width'] > $width ) && ( $pagesize['height'] > $height ) ) {
341336 $xfac = $pagesize['width'] / $width;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112613Use $file->getLocalRefPath() for shell scripts so they get an FS pathaaron17:17, 28 February 2012
r112615Committed live fixesaaron17:34, 28 February 2012

Status & tagging log