r45403 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45402‎ | r45403 | r45404 >
Date:19:43, 4 January 2009
Author:ialex
Status:deferred
Tags:
Comment:
Reset $wgLang when setlang is passed and the user is logged in so that it applies immediately
Modified paths:
  • /trunk/extensions/LanguageSelector/LanguageSelector.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LanguageSelector/LanguageSelector.php
@@ -113,6 +113,8 @@
114114 if ( $setlang != $wgUser->getOption( 'language' ) ) {
115115 $wgUser->setOption( 'language', $wgLanguageSelectorRequestedLanguage );
116116 $wgUser->saveSettings();
 117+ // Reset $wgLang so that user's language is immediately changed
 118+ $wgLang = new StubUserLang;
117119 }
118120 }
119121

Status & tagging log