https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112613

Revision: 112613
Author:   aaron
Date:     2012-02-28 17:17:42 +0000 (Tue, 28 Feb 2012)
Log Message:
-----------
Use $file->getLocalRefPath() for shell scripts so they get an FS path

Modified Paths:
--------------
    trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php

Modified: trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php
===================================================================
--- trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php 2012-02-28 
17:05:11 UTC (rev 112612)
+++ trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php 2012-02-28 
17:17:42 UTC (rev 112613)
@@ -300,7 +300,6 @@
                // Get params and force width, height and page to be integers
                $width = intval( $params['width'] );
                $height = intval( $params['height'] );
-               $srcPath = $image->getPath();
                $page = intval( $params['page'] );
                $page = $this->adjustPage( $image, $page );
 
@@ -333,6 +332,9 @@
                        if ( ( $width * $height ) > $wgMaxImageAreaForVips )
                                return $this->doThumbError( $params, 
'tiff_targetfile_too_large' );
 
+                       // Get local copy source for shell scripts
+                       $srcPath = $image->getLocalRefPath();
+
                        // Shrink factors must be > 1.
                        if ( ( $pagesize['width'] > $width ) && ( 
$pagesize['height'] > $height ) ) {
                                $xfac = $pagesize['width'] / $width;


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to