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.

This commit is contained in:
Tim Starling 2007-01-05 18:10:22 +00:00
parent fbe8b94bbe
commit 792eab2c3b

View file

@ -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();