From: Tim Starling Date: Fri, 5 Jan 2007 18:10:22 +0000 (+0000) Subject: Use $wgLang->getCode() rather than $wgUser->getOption('language') in the parser cache... X-Git-Tag: 1.31.0-rc.0~54650 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=792eab2c3bb5d5ae523fe123dd2c071f455789c7;p=lhc%2Fweb%2Fwiklou.git Use $wgLang->getCode() rather than $wgUser->getOption('language') in the parser cache rendering hash, since the latter may be overridden by a uselang= parameter in the URL. --- diff --git a/includes/User.php b/includes/User.php index e038066767..c66c2d77bc 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2017,7 +2017,7 @@ class User { * @return string */ function getPageRenderingHash() { - global $wgContLang, $wgUseDynamicDates; + global $wgContLang, $wgUseDynamicDates, $wgLang; if( $this->mHash ){ return $this->mHash; } @@ -2031,7 +2031,7 @@ class User { $confstr .= '!' . $this->getDatePreference(); } $confstr .= '!' . ($this->getOption( 'numberheadings' ) ? '1' : ''); - $confstr .= '!' . $this->getOption( 'language' ); + $confstr .= '!' . $wgLang->getCode(); $confstr .= '!' . $this->getOption( 'thumbsize' ); // add in language specific options, if any $extra = $wgContLang->getExtraHashOptions();