* (bug 3794) Include OS / platform info in Special:Version
authorRob Church <robchurch@users.mediawiki.org>
Thu, 29 Dec 2005 02:49:53 +0000 (02:49 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Thu, 29 Dec 2005 02:49:53 +0000 (02:49 +0000)
RELEASE-NOTES
includes/SpecialVersion.php

index c146136..c9a43c5 100644 (file)
@@ -368,7 +368,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * (bug 4385) Separate parser cache entries for non-editing users, so section
   edit links don't vanish / appear unwanted on protected pages
 * (bug 2726, 3397) Fix [[Special:]] and [[:Image]] links in action=render
-
+* (bug 3794) Include OS / platform info in Special:Version
 
 === Caveats ===
 
index 31e16de..097d38b 100644 (file)
@@ -1,12 +1,12 @@
 <?php
 /**#@+
- * Give information about the version of MediaWiki, PHP, the DB and extensions
+ * Give information about the version of MediaWiki, PHP, server software, the DB and extensions
  *
  * @package MediaWiki
  * @subpackage SpecialPage
  *
- * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
+ * @authors Ævar Arnfjörð Bjarmason <avarab@gmail.com>, Rob Church <robchur@gmail.com>
+ * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason, Rob Church
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
  */
 
@@ -29,7 +29,7 @@ class SpecialVersion {
         * Constructor
         */
        function SpecialVersion() {
-               // English motherfucker, do you speak it?
+               # Force to English language
                $this->langObj = setupLangObj( 'LanguageEn' );
                $this->langObj->initEncoding();
        }
@@ -84,12 +84,19 @@ class SpecialVersion {
                
                * [http://www.mediawiki.org/ MediaWiki]: $wgVersion
                * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ")
+               * " . $this->getServerSoftware() . "
                * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion() . "
                </div>";
 
                return str_replace( "\t\t", '', $ret );
        }
 
+       function getServerSoftware() {
+               # Return tweaked version of $_SERVER['SERVER_SOFTWARE']
+               $osver = explode( ' ', $_SERVER['SERVER_SOFTWARE'] );
+               return( count( $osver ) > 1 ? $osver[0] . ' ' . $osver[1] : $osver[0] );
+       }
+
        function extensionCredits() {
                global $wgExtensionCredits, $wgExtensionFunctions, $wgSkinExtensionFunction;