Index: trunk/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -100,7 +100,7 @@ |
101 | 101 | * @return wiki text showing the third party software versions (apache, php, mysql). |
102 | 102 | */ |
103 | 103 | static function softwareInformation() { |
104 | | - global $wgUseImageMagick, $wgImageMagickConvertCommand, $wgDiff3, $wgDiff; |
| 104 | + global $wgUseImageMagick, $wgImageMagickConvertCommand, $wgDiff3, $wgDiff, $wgUseTeX; |
105 | 105 | global $wgAllowTitlesInSVG, $wgSVGConverter, $wgSVGConverters, $wgSVGConverterPath; |
106 | 106 | $dbr = wfGetDB( DB_SLAVE ); |
107 | 107 | |
— | — | @@ -200,6 +200,57 @@ |
201 | 201 | $software["[$swSVGConvURL $swSVGConvName]"] = $swSVGConvVer; |
202 | 202 | } |
203 | 203 | |
| 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 | + |
204 | 255 | // Allow a hook to add/remove items |
205 | 256 | wfRunHooks( 'SoftwareInfo', array( &$software ) ); |
206 | 257 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | * Added a PHP port of CDB (constant database), for improved local caching when |
103 | 103 | the DBA extension is not available. |
104 | 104 | * (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. |
106 | 106 | * Introduced a new system for localisation caching. The system is based around |
107 | 107 | fast fetches of individual messages, minimising memory overhead and startup |
108 | 108 | time in the typical case. The database backend will be used by default, but |