r52547 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52546‎ | r52547 | r52548 >
Date:15:35, 29 June 2009
Author:shinjiman
Status:reverted
Tags:
Comment:
fix up to add the local bin path, link to r52527 and r52525 for CodeReview if any comments are added.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -203,6 +203,7 @@
204204 // Look for TeX support and print the software version info
205205 if ( $wgUseTeX ) {
206206 $binPath = '/usr/bin/';
 207+ $binPathLocal = '/usr/local/bin/';
207208 $swMathName = Array(
208209 'ocaml' => 'OCaml',
209210 'gs' => 'Ghostscript',
@@ -232,9 +233,9 @@
233234 'imagemagick' => '-version',
234235 );
235236 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);
239240 $swMathVerInfo = $swMathLine[0];
240241 if ( !strcmp( $swMath, 'gs' ) )
241242 $swMathVerInfo = str_replace( 'GPL Ghostscript ', '', $swMathVerInfo );
@@ -246,7 +247,7 @@
247248 list( $swMathVerInfo ) = explode('http://www.imagemagick.org', $tail );
248249 }
249250 $swMathVer[$swMath] = $swMathVerInfo;
250 - $software["[$swMathURL[$swMath] $swMathName[$swMath]]"] = $swMathVer[$swMath];
 251+ $software["[$swMathURL[$swMath] $swMathName[$swMath]]"] = trim ( $swMathVer[$swMath] );
251252 }
252253 }
253254 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r52624added whereis path support instead of the hardcoded local binary path to get ...shinjiman13:48, 1 July 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r52525* (bug 14611) Added support showing the version of the Math rendering engine.shinjiman18:42, 28 June 2009
r52527fix up, link to r52525 for CodeReview if any comments are added.shinjiman19:24, 28 June 2009

Status & tagging log