Index: trunk/phase3/includes/media/Bitmap.php |
— | — | @@ -149,19 +149,20 @@ |
150 | 150 | |
151 | 151 | $cmd = |
152 | 152 | $tempEnv . |
153 | | - wfEscapeShellArg($wgImageMagickConvertCommand) . |
| 153 | + wfEscapeShellArg( $wgImageMagickConvertCommand ) . |
154 | 154 | " {$quality} -background white -size {$physicalWidth} ". |
155 | | - wfEscapeShellArg($srcPath . $frame) . |
| 155 | + wfEscapeShellArg( $srcPath . $frame ) . |
156 | 156 | $animation . |
157 | 157 | // For the -resize option a "!" is needed to force exact size, |
158 | 158 | // or ImageMagick may decide your ratio is wrong and slice off |
159 | 159 | // a pixel. |
160 | 160 | " -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 |
162 | 163 | " -set comment " . wfEscapeShellArg( str_replace( '%', '%%', $descriptionUrl ) ) . |
163 | 164 | " -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" ); |
166 | 167 | wfProfileIn( 'convert' ); |
167 | 168 | $err = wfShellExec( $cmd, $retval ); |
168 | 169 | wfProfileOut( 'convert' ); |