r77262 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77261‎ | r77262 | r77263 >
Date:22:55, 24 November 2010
Author:catrope
Status:ok
Tags:
Comment:
1.16wmf4: MFT r77261 (by hand, because the code is so different that automatic merging fails completely)
Modified paths:
  • /branches/wmf/1.16wmf4/includes/media/Bitmap.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/includes/media/Bitmap.php
@@ -158,8 +158,10 @@
159159 // or ImageMagick may decide your ratio is wrong and slice off
160160 // a pixel.
161161 " -thumbnail " . wfEscapeShellArg( "{$physicalWidth}x{$physicalHeight}!" ) .
162 - // Add the source url as a comment to the thumb.
163 - " -set comment " . wfEscapeShellArg( $this->escapeMagickProperty( $comment ) ) .
 162+ // Add the source url as a comment to the thumb, but don't add the flag if there's no comment
 163+ $params['comment'] !== ''
 164+ ? " -set comment " . wfEscapeShellArg( $this->escapeMagickProperty( $params['comment'] ) )
 165+ : '' .
164166 " -depth 8 $sharpen " .
165167 wfEscapeShellArg( $this->escapeMagickOutput( $dstPath ) ) . " 2>&1";
166168 wfDebug( __METHOD__.": running ImageMagick: $cmd\n" );

Follow-up revisions

RevisionCommit summaryAuthorDate
r772631.16wmf4: Fix $params['comment'] vs. $comment issue in r77262catrope23:02, 24 November 2010
r772641.16wmf4: Fix r77262 some more with parenthesescatrope23:06, 24 November 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77261Fix strange bug in ImageMagick call: if $params['comment'] was set to '' (whi...catrope22:50, 24 November 2010

Status & tagging log