Index: trunk/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -203,6 +203,7 @@ |
204 | 204 | // Look for TeX support and print the software version info |
205 | 205 | if ( $wgUseTeX ) { |
206 | 206 | $binPath = '/usr/bin/'; |
| 207 | + $binPathLocal = '/usr/local/bin/'; |
207 | 208 | $swMathName = Array( |
208 | 209 | 'ocaml' => 'OCaml', |
209 | 210 | 'gs' => 'Ghostscript', |
— | — | @@ -232,9 +233,9 @@ |
233 | 234 | 'imagemagick' => '-version', |
234 | 235 | ); |
235 | 236 | foreach ( $swMathExec as $swMath => $swMathCmd ) { |
236 | | - if ( file_exists( $binPath . $swMathCmd ) ) { |
237 | | - $swMathInfo = self::execOutput( $binPath . $swMathCmd . ' ' . $swMathParam[$swMath] ); |
238 | | - $swMathLine = explode("\n",$swMathInfo ,2); |
| 237 | + if ( file_exists( $binPath . $swMathCmd ) || file_exists( $binPathLocal . $swMathCmd ) ) { |
| 238 | + $swMathInfo = self::execOutput( $swMathCmd . ' ' . $swMathParam[$swMath] ); |
| 239 | + $swMathLine = explode( "\n", $swMathInfo, 2); |
239 | 240 | $swMathVerInfo = $swMathLine[0]; |
240 | 241 | if ( !strcmp( $swMath, 'gs' ) ) |
241 | 242 | $swMathVerInfo = str_replace( 'GPL Ghostscript ', '', $swMathVerInfo ); |
— | — | @@ -246,7 +247,7 @@ |
247 | 248 | list( $swMathVerInfo ) = explode('http://www.imagemagick.org', $tail ); |
248 | 249 | } |
249 | 250 | $swMathVer[$swMath] = $swMathVerInfo; |
250 | | - $software["[$swMathURL[$swMath] $swMathName[$swMath]]"] = $swMathVer[$swMath]; |
| 251 | + $software["[$swMathURL[$swMath] $swMathName[$swMath]]"] = trim ( $swMathVer[$swMath] ); |
251 | 252 | } |
252 | 253 | } |
253 | 254 | } |