r51417 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51416‎ | r51417 | r51418 >
Date:16:45, 3 June 2009
Author:werdna
Status:ok
Tags:
Comment:
Add extra toggles from $wgContLang->getExtraUserToggles() to preferences, under i18n
Modified paths:
  • /trunk/phase3/includes/Preferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Preferences.php
@@ -885,6 +885,20 @@
886886 'section' => 'misc/diffs',
887887 'label-message' => 'tog-norollbackdiff',
888888 );
 889+
 890+ // Stuff from Language::getExtraUserToggles()
 891+ global $wgContLang;
 892+
 893+ $toggles = $wgContLang->getExtraUserToggles();
 894+
 895+ foreach( $toggles as $toggle ) {
 896+ $defaultPreferences[$toggle] =
 897+ array(
 898+ 'type' => 'toggle',
 899+ 'section' => 'personal/i18n',
 900+ 'label-message' => "tog-$toggle",
 901+ );
 902+ }
889903 }
890904
891905 static function generateSkinOptions( $user ) {

Status & tagging log