* (bug 14611) Added support showing the version of the diff/diff3 engine.
authorShinjiman <shinjiman@users.mediawiki.org>
Sat, 27 Jun 2009 10:40:15 +0000 (10:40 +0000)
committerShinjiman <shinjiman@users.mediawiki.org>
Sat, 27 Jun 2009 10:40:15 +0000 (10:40 +0000)
RELEASE-NOTES
includes/specials/SpecialVersion.php

index 293e4ad..6090a9a 100644 (file)
@@ -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 ===
 
index 1563d65..85165fa 100644 (file)
@@ -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, '"' ) ) ) {