r18899 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18898‎ | r18899 | r18900 >
Date:01:53, 7 January 2007
Author:robchurch
Status:old
Tags:
Comment:
Move content language details to HTML comments; doesn't need to be immediately there, and it looks a bit odd
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialVersion.php
@@ -33,6 +33,7 @@
3434 $this->extensionCredits() .
3535 $this->wgHooks()
3636 );
 37+ $wgOut->addHtml( self::getLanguageInfo() );
3738 $wgOut->addHTML( $this->IPInfo() );
3839 $wgOut->addHTML( '</div>' );
3940 }
@@ -75,7 +76,7 @@
7677 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
7778 or [http://www.gnu.org/copyleft/gpl.html read it online]
7879
79 - * [http://www.mediawiki.org/ MediaWiki]: $version ($wgLanguageCode $mwlang)
 80+ * [http://www.mediawiki.org/ MediaWiki]: $version
8081 * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ")
8182 * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion();
8283
@@ -290,6 +291,18 @@
291292 return intval( $content[3] );
292293 }
293294 }
 295+
 296+ /**
 297+ * Get the content language name and code, for debugging/support purposes
 298+ *
 299+ * @return string
 300+ */
 301+ private static function getLanguageInfo() {
 302+ global $wgContLang;
 303+ $code = $wgContLang->getCode();
 304+ $name = Language::getLanguageName( $code );
 305+ return '<!-- ' . htmlspecialchars( "Content Language: {$name} [{$code}]" ) . ' -->';
 306+ }
294307
295308 /**#@-*/
296309 }
Index: trunk/phase3/RELEASE-NOTES
@@ -470,7 +470,8 @@
471471 * (bug 8417) Handle EXIF unknown dates
472472 * (bug 8372) Return nothing on empty <math> tags.
473473 * New maintenance script to show the cached statistics : showStats.php.
474 -* Added language code and name in Special:Version next to MediaWiki version.
 474+* Emit content language information in a comment in Special:Version, for
 475+ debugging/support purposes
475476 * New special page to list available interwikis [[Special:Listinterwikis]]
476477 * Count deleted edits when regenerating total edits in maintenance/initStats.php
477478