From a8264e4a0a224e5e77f1e05585928b8cf4fce743 Mon Sep 17 00:00:00 2001 From: Shinjiman Date: Mon, 29 Jun 2009 15:35:18 +0000 Subject: [PATCH] fix up to add the local bin path, link to r52527 and r52525 for CodeReview if any comments are added. --- includes/specials/SpecialVersion.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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] ); } } } -- 2.20.1