From: Shinjiman Date: Sun, 28 Jun 2009 17:29:31 +0000 (+0000) Subject: further fix up for r52522, link to r52516 for CodeReview if having any comments. X-Git-Tag: 1.31.0-rc.0~41177 X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=commitdiff_plain;h=88910811a8800ff632df4cbe4a94e7231616b8f9;p=lhc%2Fweb%2Fwiklou.git further fix up for r52522, link to r52516 for CodeReview if having any comments. --- diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index d92bc0f249..18ed0ca289 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -166,7 +166,9 @@ class SpecialVersion extends SpecialPage { } if ( !strcmp( $wgSVGConverter, 'ImageMagick') ) { // Get version info for ImageMagick - if ( ( file_exists( $execBinPath ) ) || file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) + if ( file_exists( $execBinPath ) ) + $swSVGConvInfo = self::execOutput( $execBinPath . ' -version' ); + else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) $swSVGConvInfo = self::execOutput( $execFullPath . ' -version' ); list( $head, $tail ) = explode( 'ImageMagick', $swSVGConvInfo ); list( $swSVGConvVer ) = explode('http://www.imagemagick.org', $tail ); @@ -174,7 +176,9 @@ class SpecialVersion extends SpecialPage { $haveSVGConvVer = true; } else if ( strstr ($execFullPath, 'rsvg') != false ) { // Get version info for rsvg - if ( ( file_exists( $execBinPath ) ) || file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) + if ( file_exists( $execBinPath ) ) + $swSVGConvInfo = self::execOutput( $execBinPath . ' -v' ); + else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) $swSVGConvInfo = self::execOutput( $execFullPath . ' -v' ); $swSVGConvLine = explode("\n",$swSVGConvInfo ,2); $swSVGConvVer = $swSVGConvLine[0]; @@ -182,7 +186,9 @@ class SpecialVersion extends SpecialPage { $haveSVGConvVer = true; } else if ( strstr ($execFullPath, 'inkscape') != false ) { // Get version info for Inkscape - if ( ( file_exists( $execBinPath ) ) || file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) + if ( file_exists( $execBinPath ) ) + $swSVGConvInfo = self::execOutput( $execBinPath . ' -z -V' ); + else if ( file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) $swSVGConvInfo = self::execOutput( $execFullPath . ' -z -V' ); $swSVGConvLine = explode("\n",$swSVGConvInfo ,2); $swSVGConvVer = ltrim( $swSVGConvLine[0], 'Inkscape ' );