From 792eab2c3bb5d5ae523fe123dd2c071f455789c7 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 5 Jan 2007 18:10:22 +0000 Subject: [PATCH] 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. --- includes/User.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); -- 2.20.1