From: Shinjiman Date: Mon, 29 Jun 2009 15:35:18 +0000 (+0000) Subject: fix up to add the local bin path, link to r52527 and r52525 for CodeReview if any... X-Git-Tag: 1.31.0-rc.0~41172 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=a8264e4a0a224e5e77f1e05585928b8cf4fce743;p=lhc%2Fweb%2Fwiklou.git fix up to add the local bin path, link to r52527 and r52525 for CodeReview if any comments are added. --- diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index d54b620a11..a4b6dbd313 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -203,6 +203,7 @@ class SpecialVersion extends SpecialPage { // Look for TeX support and print the software version info if ( $wgUseTeX ) { $binPath = '/usr/bin/'; + $binPathLocal = '/usr/local/bin/'; $swMathName = Array( 'ocaml' => 'OCaml', 'gs' => 'Ghostscript', @@ -232,9 +233,9 @@ class SpecialVersion extends SpecialPage { 'imagemagick' => '-version', ); foreach ( $swMathExec as $swMath => $swMathCmd ) { - if ( file_exists( $binPath . $swMathCmd ) ) { - $swMathInfo = self::execOutput( $binPath . $swMathCmd . ' ' . $swMathParam[$swMath] ); - $swMathLine = explode("\n",$swMathInfo ,2); + if ( file_exists( $binPath . $swMathCmd ) || file_exists( $binPathLocal . $swMathCmd ) ) { + $swMathInfo = self::execOutput( $swMathCmd . ' ' . $swMathParam[$swMath] ); + $swMathLine = explode( "\n", $swMathInfo, 2); $swMathVerInfo = $swMathLine[0]; if ( !strcmp( $swMath, 'gs' ) ) $swMathVerInfo = str_replace( 'GPL Ghostscript ', '', $swMathVerInfo ); @@ -246,7 +247,7 @@ class SpecialVersion extends SpecialPage { list( $swMathVerInfo ) = explode('http://www.imagemagick.org', $tail ); } $swMathVer[$swMath] = $swMathVerInfo; - $software["[$swMathURL[$swMath] $swMathName[$swMath]]"] = $swMathVer[$swMath]; + $software["[$swMathURL[$swMath] $swMathName[$swMath]]"] = trim ( $swMathVer[$swMath] ); } } }