Index: trunk/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -156,31 +156,33 @@ |
157 | 157 | $swSVGConvName = $wgSVGConverter; |
158 | 158 | $haveSVGConvVer = false; |
159 | 159 | $pathVar = '$path/'; |
| 160 | + $binPath = '/usr/bin/'; |
160 | 161 | $execPath = strtok(strstr($wgSVGConverters[$wgSVGConverter],$pathVar), ' '); |
161 | 162 | $execPath = substr_replace($execPath, '', 0, strlen($pathVar)); |
162 | 163 | $execFullPath = trim($wgSVGConverterPath,'"') . $execPath; |
| 164 | + $execBinPath = $binPath . $execPath; |
163 | 165 | if (strstr($execFullPath, ' ') != false) { |
164 | | - $execFullPath = '"'.$execFullPath.'"'; |
| 166 | + $execFullPath = '"' . $execFullPath . '"'; |
165 | 167 | } |
166 | 168 | if ( !strcmp( $wgSVGConverter, 'ImageMagick') ) { |
167 | 169 | // Get version info for ImageMagick |
168 | | - if ( file_exists( trim( $execFullPath, '"' ) ) || file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) |
| 170 | + if ( ( file_exists( $execBinPath ) ) || file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) |
169 | 171 | $swSVGConvInfo = self::execOutput( $execFullPath . ' -version' ); |
170 | 172 | list( $head, $tail ) = explode( 'ImageMagick', $swSVGConvInfo ); |
171 | 173 | list( $swSVGConvVer ) = explode('http://www.imagemagick.org', $tail ); |
172 | 174 | $swSVGConvURL = 'http://www.imagemagick.org/'; |
173 | 175 | $haveSVGConvVer = true; |
174 | | - } else if (strstr ($execFullPath, 'rsvg') != false) { |
| 176 | + } else if ( strstr ($execFullPath, 'rsvg') != false ) { |
175 | 177 | // Get version info for rsvg |
176 | | - if ( file_exists( trim( $execFullPath, '"' ) ) || file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) |
| 178 | + if ( ( file_exists( $execBinPath ) ) || file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) |
177 | 179 | $swSVGConvInfo = self::execOutput( $execFullPath . ' -v' ); |
178 | 180 | $swSVGConvLine = explode("\n",$swSVGConvInfo ,2); |
179 | 181 | $swSVGConvVer = $swSVGConvLine[0]; |
180 | 182 | $swSVGConvURL = 'http://librsvg.sourceforge.net/'; |
181 | 183 | $haveSVGConvVer = true; |
182 | | - } else if (strstr ($execFullPath, 'inkscape') != false) { |
| 184 | + } else if ( strstr ($execFullPath, 'inkscape') != false ) { |
183 | 185 | // Get version info for Inkscape |
184 | | - if ( file_exists( trim( $execFullPath, '"' ) ) || file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) |
| 186 | + if ( ( file_exists( $execBinPath ) ) || file_exists( trim( $execFullPath, '"' ) ) || ( file_exists( trim( $execFullPath, '"' ) . '.exe' ) ) ) |
185 | 187 | $swSVGConvInfo = self::execOutput( $execFullPath . ' -z -V' ); |
186 | 188 | $swSVGConvLine = explode("\n",$swSVGConvInfo ,2); |
187 | 189 | $swSVGConvVer = ltrim( $swSVGConvLine[0], 'Inkscape ' ); |