r90921 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90920‎ | r90921 | r90922 >
Date:23:08, 27 June 2011
Author:neilk
Status:ok (Comments)
Tags:
Comment:
use new $wgExiv2Command global. Already defined in DefaultSettings so in default/unix case, no need to redefine it.
Modified paths:
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler.image.php (modified) (history)
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler.php
@@ -32,7 +32,7 @@
3333 $wgUseImageMagick = true;
3434 $wgImageMagickConvertCommand = "C:\Program Files\ImageMagick-6.5.6-Q8\convert";
3535 $wgImageMagickIdentifyCommand = "C:\Program Files\ImageMagick-6.5.6-Q8\identify";
36 -$wgTiffExivCommand = "C:\Program Files\Exiv2\exiv2";
 36+$wgExiv2Command = "C:\Program Files\Exiv2\exiv2";
3737 $wgMaxUploadSize = 1073741824;
3838 $wgShowEXIF = true;
3939 */
@@ -89,8 +89,6 @@
9090
9191 // Path to identify
9292 $wgImageMagickIdentifyCommand = '/usr/bin/identify';
93 -// Path to exiv2
94 -$wgTiffExivCommand = '/usr/bin/exiv2';
9593 // Use exiv2? if false, MediaWiki's internal EXIF parser will be used
9694 $wgTiffUseExiv = false;
9795 //path to tiffinfo
Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler.image.php
@@ -86,7 +86,7 @@
8787 * meta['warnings'] = identify-warnings
8888 */
8989 public function retrieveMetaData() {
90 - global $wgImageMagickIdentifyCommand, $wgTiffExivCommand, $wgTiffUseExiv;
 90+ global $wgImageMagickIdentifyCommand, $wgExiv2Command, $wgTiffUseExiv;
9191 global $wgTiffUseTiffinfo, $wgTiffTiffinfoCommand;
9292 global $wgShowEXIF;
9393
@@ -150,7 +150,7 @@
151151 // see exiv2-doc @link http://www.exiv2.org/sample.html
152152 // NOTE: the linux version of exiv2 has a bug: it can only
153153 // read one type of meta-data at a time, not all at once.
154 - $cmd = wfEscapeShellArg( $wgTiffExivCommand ) .
 154+ $cmd = wfEscapeShellArg( $wgExiv2Command ) .
155155 ' -u -psix -Pnt ' . wfEscapeShellArg( $this->mFilename ) . ' 2>&1';
156156
157157 wfProfileIn( 'exiv2' );

Comments

#Comment by 😂 (talk | contribs)   21:18, 28 June 2011

If this is already set in DefaultSettings, why are you overriding it here? Same thing with $wgImageMagickConvertCommand.

#Comment by 😂 (talk | contribs)   21:20, 28 June 2011

Yeah ignore me.

Status & tagging log