r52523 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52522‎ | r52523 | r52524 >
Date:17:29, 28 June 2009
Author:shinjiman
Status:reverted
Tags:
Comment:
further fix up for r52522, link to r52516 for CodeReview if having any comments.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -166,7 +166,9 @@
167167 }
168168 if ( !strcmp( $wgSVGConverter, 'ImageMagick') ) {
169169 // Get version info for ImageMagick
170 - if ( ( file_exists( $execBinPath ) ) || file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) )
 170+ if ( file_exists( $execBinPath ) )
 171+ $swSVGConvInfo = self::execOutput( $execBinPath . ' -version' );
 172+ else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) )
171173 $swSVGConvInfo = self::execOutput( $execFullPath . ' -version' );
172174 list( $head, $tail ) = explode( 'ImageMagick', $swSVGConvInfo );
173175 list( $swSVGConvVer ) = explode('http://www.imagemagick.org', $tail );
@@ -174,7 +176,9 @@
175177 $haveSVGConvVer = true;
176178 } else if ( strstr ($execFullPath, 'rsvg') != false ) {
177179 // Get version info for rsvg
178 - if ( ( file_exists( $execBinPath ) ) || file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) )
 180+ if ( file_exists( $execBinPath ) )
 181+ $swSVGConvInfo = self::execOutput( $execBinPath . ' -v' );
 182+ else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) )
179183 $swSVGConvInfo = self::execOutput( $execFullPath . ' -v' );
180184 $swSVGConvLine = explode("\n",$swSVGConvInfo ,2);
181185 $swSVGConvVer = $swSVGConvLine[0];
@@ -182,7 +186,9 @@
183187 $haveSVGConvVer = true;
184188 } else if ( strstr ($execFullPath, 'inkscape') != false ) {
185189 // Get version info for Inkscape
186 - if ( ( file_exists( $execBinPath ) ) || file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) )
 190+ if ( file_exists( $execBinPath ) )
 191+ $swSVGConvInfo = self::execOutput( $execBinPath . ' -z -V' );
 192+ else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) )
187193 $swSVGConvInfo = self::execOutput( $execFullPath . ' -z -V' );
188194 $swSVGConvLine = explode("\n",$swSVGConvInfo ,2);
189195 $swSVGConvVer = ltrim( $swSVGConvLine[0], 'Inkscape ' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r52516* (bug 14611) Added support showing the version of the SVG image thumbnailing...shinjiman16:25, 28 June 2009
r52522fix regression in r52516 for some distributions which are unable to show the ...shinjiman17:24, 28 June 2009

Status & tagging log