From: Rob Church Date: Sun, 7 Jan 2007 01:53:44 +0000 (+0000) Subject: Move content language details to HTML comments; doesn't need to be immediately there... X-Git-Tag: 1.31.0-rc.0~54625 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=f065b6562f5f02cc741e9ce3c0ebfd8c2c982065;hp=e6bf6ea9442f2fab03db5645731ddedeaa2de951;p=lhc%2Fweb%2Fwiklou.git Move content language details to HTML comments; doesn't need to be immediately there, and it looks a bit odd --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 76a4dd2d4b..d0ebb1d790 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -470,7 +470,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 8417) Handle EXIF unknown dates * (bug 8372) Return nothing on empty tags. * New maintenance script to show the cached statistics : showStats.php. -* Added language code and name in Special:Version next to MediaWiki version. +* Emit content language information in a comment in Special:Version, for + debugging/support purposes * New special page to list available interwikis [[Special:Listinterwikis]] * Count deleted edits when regenerating total edits in maintenance/initStats.php diff --git a/includes/SpecialVersion.php b/includes/SpecialVersion.php index e477181f04..668ab94f8b 100644 --- a/includes/SpecialVersion.php +++ b/includes/SpecialVersion.php @@ -33,6 +33,7 @@ class SpecialVersion { $this->extensionCredits() . $this->wgHooks() ); + $wgOut->addHtml( self::getLanguageInfo() ); $wgOut->addHTML( $this->IPInfo() ); $wgOut->addHTML( '' ); } @@ -75,7 +76,7 @@ class SpecialVersion { Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. or [http://www.gnu.org/copyleft/gpl.html read it online] - * [http://www.mediawiki.org/ MediaWiki]: $version ($wgLanguageCode $mwlang) + * [http://www.mediawiki.org/ MediaWiki]: $version * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ") * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion(); @@ -290,6 +291,18 @@ class SpecialVersion { return intval( $content[3] ); } } + + /** + * Get the content language name and code, for debugging/support purposes + * + * @return string + */ + private static function getLanguageInfo() { + global $wgContLang; + $code = $wgContLang->getCode(); + $name = Language::getLanguageName( $code ); + return ''; + } /**#@-*/ }