Index: trunk/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -166,7 +166,9 @@ |
167 | 167 | } |
168 | 168 | if ( !strcmp( $wgSVGConverter, 'ImageMagick') ) { |
169 | 169 | // 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' ) ) ) |
171 | 173 | $swSVGConvInfo = self::execOutput( $execFullPath . ' -version' ); |
172 | 174 | list( $head, $tail ) = explode( 'ImageMagick', $swSVGConvInfo ); |
173 | 175 | list( $swSVGConvVer ) = explode('http://www.imagemagick.org', $tail ); |
— | — | @@ -174,7 +176,9 @@ |
175 | 177 | $haveSVGConvVer = true; |
176 | 178 | } else if ( strstr ($execFullPath, 'rsvg') != false ) { |
177 | 179 | // 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' ) ) ) |
179 | 183 | $swSVGConvInfo = self::execOutput( $execFullPath . ' -v' ); |
180 | 184 | $swSVGConvLine = explode("\n",$swSVGConvInfo ,2); |
181 | 185 | $swSVGConvVer = $swSVGConvLine[0]; |
— | — | @@ -182,7 +186,9 @@ |
183 | 187 | $haveSVGConvVer = true; |
184 | 188 | } else if ( strstr ($execFullPath, 'inkscape') != false ) { |
185 | 189 | // 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' ) ) ) |
187 | 193 | $swSVGConvInfo = self::execOutput( $execFullPath . ' -z -V' ); |
188 | 194 | $swSVGConvLine = explode("\n",$swSVGConvInfo ,2); |
189 | 195 | $swSVGConvVer = ltrim( $swSVGConvLine[0], 'Inkscape ' ); |