r64936 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64935‎ | r64936 | r64937 >
Date:13:59, 11 April 2010
Author:btongminh
Status:ok
Tags:
Comment:
Follow up r64935: Add whitespace and clarify comment a bit more.
Modified paths:
  • /trunk/phase3/includes/media/Bitmap.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/Bitmap.php
@@ -149,19 +149,20 @@
150150
151151 $cmd =
152152 $tempEnv .
153 - wfEscapeShellArg($wgImageMagickConvertCommand) .
 153+ wfEscapeShellArg( $wgImageMagickConvertCommand ) .
154154 " {$quality} -background white -size {$physicalWidth} ".
155 - wfEscapeShellArg($srcPath . $frame) .
 155+ wfEscapeShellArg( $srcPath . $frame ) .
156156 $animation .
157157 // For the -resize option a "!" is needed to force exact size,
158158 // or ImageMagick may decide your ratio is wrong and slice off
159159 // a pixel.
160160 " -thumbnail " . wfEscapeShellArg( "{$physicalWidth}x{$physicalHeight}!" ) .
161 - // A % is an escape character in ImageMagick
 161+ // Add the source url as a comment to the thumb. A % is an
 162+ // escape character in ImageMagick, so needs escaping
162163 " -set comment " . wfEscapeShellArg( str_replace( '%', '%%', $descriptionUrl ) ) .
163164 " -depth 8 $sharpen " .
164 - wfEscapeShellArg($dstPath) . " 2>&1";
165 - wfDebug( __METHOD__.": running ImageMagick: $cmd\n");
 165+ wfEscapeShellArg( $dstPath ) . " 2>&1";
 166+ wfDebug( __METHOD__.": running ImageMagick: $cmd\n" );
166167 wfProfileIn( 'convert' );
167168 $err = wfShellExec( $cmd, $retval );
168169 wfProfileOut( 'convert' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r64947Follow up r64936. Even better, provide the bug number and imagemagick doc page.platonides20:47, 11 April 2010
r65681MFT r65467 (and r64935, r64936, r64947 to sync the base): updated fix for bug...tstarling05:33, 30 April 2010
r65682MFT r65467 (and r64935, r64936, r64947 to sync the base): updated fix for bug...tstarling05:37, 30 April 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64935Follow up r64932: Add comment on why % is escapedbtongminh13:54, 11 April 2010

Status & tagging log