r37668 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37667‎ | r37668 | r37669 >
Date:22:20, 14 July 2008
Author:rainman
Status:old
Tags:
Comment:
Sequel to r37662: avoid infinite recursion in User when default params are used.
Modified paths:
  • /trunk/phase3/languages/LanguageConverter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/LanguageConverter.php
@@ -125,7 +125,11 @@
126126 return $this->mPreferredVariant;
127127
128128 // figure out user lang without constructing wgLang to avoid infinite recursion
129 - $userLang = $wgRequest->getVal( 'uselang', $wgUser->getOption( 'language' ) );
 129+ if( $fromUser )
 130+ $defaultUserLang = $wgUser->getOption( 'language' );
 131+ else
 132+ $defaultUserLang = $this->mMainLanguageCode;
 133+ $userLang = $wgRequest->getVal( 'uselang', $defaultUserLang );
130134 // see if interface language is same as content, if not, prevent conversion
131135 if( $this->mMainLanguageCode != $userLang ){
132136 $this->mPreferredVariant = $this->mMainLanguageCode; // no conversion

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r37662* (bug 10837) Language variants overrides languages other than the variant ma...rainman21:32, 14 July 2008

Status & tagging log