From c0fc14089d74fecdd0076e52d61c2775869f8f9c Mon Sep 17 00:00:00 2001 From: Shinjiman Date: Sat, 27 Jun 2009 10:40:15 +0000 Subject: [PATCH] * (bug 14611) Added support showing the version of the diff/diff3 engine. --- RELEASE-NOTES | 2 +- includes/specials/SpecialVersion.php | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 293e4ade1a..6090a9a864 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -92,7 +92,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Added a PHP port of CDB (constant database), for improved local caching when the DBA extension is not available. * (bug 14611) Added support showing the version of the image thumbnailing - engine. + engine and diff/diff3 engine. === Bug fixes in 1.16 === diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 1563d65f51..85165fa8e4 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -100,7 +100,7 @@ class SpecialVersion extends SpecialPage { * @return wiki text showing the third party software versions (apache, php, mysql). */ static function softwareInformation() { - global $wgUseImageMagick, $wgImageMagickConvertCommand; + global $wgUseImageMagick, $wgImageMagickConvertCommand, $wgDiff3, $wgDiff; $dbr = wfGetDB( DB_SLAVE ); // Put the software in an array of form 'name' => 'version'. All messages should @@ -111,6 +111,22 @@ class SpecialVersion extends SpecialPage { $software['[http://www.php.net/ PHP]'] = phpversion() . " (" . php_sapi_name() . ")"; $software[$dbr->getSoftwareLink()] = $dbr->getServerVersion(); + // Version information for diff3 + if ( file_exists( trim( $wgDiff3, '"' ) ) ) { + $swDiff3Info = self::execOutput( $wgDiff3 . ' -v' ); + $swDiff3Line = explode("\n",$swDiff3Info ,2); + $swDiff3Ver = $swDiff3Line[0]; + $software['[http://www.gnu.org/software/diffutils/diffutils.html diff3]'] = $swDiff3Ver; + } + + // Version information for diff + if ( file_exists( trim( $wgDiff, '"' ) ) ) { + $swDiffInfo = self::execOutput( $wgDiff . ' -v' ); + $swDiffLine = explode("\n",$swDiffInfo ,2); + $swDiffVer = $swDiffLine[0]; + $software['[http://www.gnu.org/software/diffutils/diffutils.html diff]'] = $swDiffVer; + } + // Look for ImageMagick's version, if did not found, try to find the GD library version if ( $wgUseImageMagick === true ) { if ( file_exists( trim( $wgImageMagickConvertCommand, '"' ) ) ) { -- 2.20.1