r52525 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52524‎ | r52525 | r52526 >
Date:18:42, 28 June 2009
Author:shinjiman
Status:reverted
Tags:
Comment:
* (bug 14611) Added support showing the version of the Math rendering engine.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -100,7 +100,7 @@
101101 * @return wiki text showing the third party software versions (apache, php, mysql).
102102 */
103103 static function softwareInformation() {
104 - global $wgUseImageMagick, $wgImageMagickConvertCommand, $wgDiff3, $wgDiff;
 104+ global $wgUseImageMagick, $wgImageMagickConvertCommand, $wgDiff3, $wgDiff, $wgUseTeX;
105105 global $wgAllowTitlesInSVG, $wgSVGConverter, $wgSVGConverters, $wgSVGConverterPath;
106106 $dbr = wfGetDB( DB_SLAVE );
107107
@@ -200,6 +200,57 @@
201201 $software["[$swSVGConvURL $swSVGConvName]"] = $swSVGConvVer;
202202 }
203203
 204+ // Look for TeX support and print the software version info
 205+ if ( $wgUseTeX ) {
 206+ $binPath = '/usr/bin/';
 207+ $swMathName = Array(
 208+ 'ocaml' => 'OCaml',
 209+ 'gs' => 'Ghostscript',
 210+ 'dvips' => 'Dvips',
 211+ 'latex' => 'LaTeX',
 212+ 'imagemagick' => 'ImageMagick',
 213+ );
 214+ $swMathNURL = Array(
 215+ 'ocaml' => 'http://caml.inria.fr/',
 216+ 'gs' => 'http://www.ghostscript.com/',
 217+ 'dvips' => 'http://www.radicaleye.com/dvips.html',
 218+ 'latex' => 'http://www.latex-project.org/',
 219+ 'imagemagick' => 'http://www.imagemagick.org/',
 220+ );
 221+ $swMathExec = Array(
 222+ 'ocaml' => 'ocamlc',
 223+ 'gs' => 'gs',
 224+ 'dvips' => 'dvips',
 225+ 'latex' => 'latex',
 226+ 'imagemagick' => 'convert',
 227+ );
 228+ $swMathParam = Array(
 229+ 'ocaml' => '-version',
 230+ 'gs' => '-v',
 231+ 'dvips' => '-v',
 232+ 'latex' => '-v',
 233+ 'imagemagick' => '-version',
 234+ );
 235+ 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);
 239+ $swMathVerInfo = $swMathLine[0];
 240+ if ( !strcmp( $swMath, 'gs' ) )
 241+ $swMathVerInfo = str_replace( 'GPL Ghostscript ', '', $swMathVerInfo );
 242+ else if ( !strcmp( $swMath, 'dvips' ) ) {
 243+ $swMathVerParts = explode( ' ' , $swMathVerInfo );
 244+ $swMathVerInfo = $swMathVerParts[3];
 245+ } else if ( !strcmp( $swMath, 'imagemagick' ) ) {
 246+ list( $head, $tail ) = explode( 'ImageMagick', $swMathVerInfo );
 247+ list( $swMathVerInfo ) = explode('http://www.imagemagick.org', $tail );
 248+ }
 249+ $swMathVer[$swMath] = $swMathVerInfo;
 250+ $software["[$swMathURL $swMathName]"] = $swMathVer[$swMath];
 251+ }
 252+ }
 253+ }
 254+
204255 // Allow a hook to add/remove items
205256 wfRunHooks( 'SoftwareInfo', array( &$software ) );
206257
Index: trunk/phase3/RELEASE-NOTES
@@ -101,7 +101,7 @@
102102 * Added a PHP port of CDB (constant database), for improved local caching when
103103 the DBA extension is not available.
104104 * (bug 14611) Added support showing the version of the image thumbnailing
105 - engine and diff/diff3 engine.
 105+ engine, diff/diff3 engine and TeX engine.
106106 * Introduced a new system for localisation caching. The system is based around
107107 fast fetches of individual messages, minimising memory overhead and startup
108108 time in the typical case. The database backend will be used by default, but

Follow-up revisions

RevisionCommit summaryAuthorDate
r52527fix up, link to r52525 for CodeReview if any comments are added.shinjiman19:24, 28 June 2009
r52547fix up to add the local bin path, link to r52527 and r52525 for CodeReview if...shinjiman15:35, 29 June 2009
r52624added whereis path support instead of the hardcoded local binary path to get ...shinjiman13:48, 1 July 2009
r52792* (bug 14611) Added support showing the version of the web server which it is...shinjiman12:08, 6 July 2009
r53398* (bug 14611) Add a global variable hook to show the extended software inform...shinjiman14:49, 17 July 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r52476* (bug 14611) Added support showing the version of the image thumbnailing eng...shinjiman21:58, 26 June 2009
r52486* (bug 14611) Added support showing the version of the diff/diff3 engine.shinjiman10:40, 27 June 2009
r52516* (bug 14611) Added support showing the version of the SVG image thumbnailing...shinjiman16:25, 28 June 2009

Status & tagging log