r105275 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105274‎ | r105275 | r105276 >
Date:01:56, 6 December 2011
Author:tstarling
Status:ok
Tags:
Comment:
Fix stray quotes from r61478, they cause a file not found error from VIPS. I haven't tested this specific instance of wfEscapeShellArg() in Windows so I removed the comment that says that, but I did test wfEscapeShellArg() extensively both in Linux and Windows when I wrote it, so I know how it's meant to be used.
Modified paths:
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php
@@ -350,15 +350,14 @@
351351 if ( ( $pagesize['width'] > $width ) && ( $pagesize['height'] > $height ) ) {
352352 $xfac = $pagesize['width'] / $width;
353353 $yfac = $pagesize['height'] / $height;
354 - // tested in Linux and Windows
355354 $cmd = wfEscapeShellArg( $wgTiffVipsCommand );
356 - $cmd .= ' im_shrink "' . wfEscapeShellArg( $srcPath ) . ':' . ( $page - 1 ) . '" ';
 355+ $cmd .= ' im_shrink ' . wfEscapeShellArg( $srcPath . ':' . ( $page - 1 ) ) . ' ';
357356 $cmd .= wfEscapeShellArg( $dstPath );
358357 $cmd .= " {$xfac} {$yfac} 2>&1";
359358 } else {
360 - // tested in Linux and Windows
361359 $cmd = wfEscapeShellArg( $wgTiffVipsCommand );
362 - $cmd .= ' im_resize_linear "' . wfEscapeShellArg( $srcPath ) . ':' . ( $page - 1 ) . '" ';
 360+ $cmd .= ' im_resize_linear ' . wfEscapeShellArg( $srcPath . ':' .
 361+ ( $page - 1 ) ) . ' ';
363362 $cmd .= wfEscapeShellArg( $dstPath );
364363 $cmd .= " {$width} {$height} 2>&1";
365364 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r107976MFT r104971, r105275, r105902reedy00:44, 4 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61478Initial upload of PagedTiffHandler. This is still in testing phase.mglaser23:54, 24 January 2010

Status & tagging log