From 1d6b69d406c2d116895d0ba3b053bc593620d8d6 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Thu, 29 Dec 2005 02:49:53 +0000 Subject: [PATCH] * (bug 3794) Include OS / platform info in Special:Version --- RELEASE-NOTES | 2 +- includes/SpecialVersion.php | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c14613644f..c9a43c5386 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/SpecialVersion.php b/includes/SpecialVersion.php index 31e16dee80..097d38bff3 100644 --- a/includes/SpecialVersion.php +++ b/includes/SpecialVersion.php @@ -1,12 +1,12 @@ - * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason + * @authors Ævar Arnfjörð Bjarmason , Rob Church + * @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() . " "; 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; -- 2.20.1