From: Zheng Zhu Date: Fri, 24 Sep 2004 00:10:34 +0000 (+0000) Subject: Setting default user option using the content language rather than the UI language X-Git-Tag: 1.5.0alpha1~1835 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=382e2b0b34717913302fec41b72237cf4e28e228;p=lhc%2Fweb%2Fwiklou.git Setting default user option using the content language rather than the UI language --- diff --git a/includes/User.php b/includes/User.php index d2e76546ee..42aadbe4d4 100644 --- a/includes/User.php +++ b/includes/User.php @@ -131,7 +131,7 @@ class User { * if we have an available language object. */ function loadDefaults() { - global $wgLang, $wgIP; + global $wgContLang, $wgIP; global $wgNamespacesToBeSearchedDefault; $this->mId = $this->mNewtalk = 0; @@ -140,7 +140,7 @@ class User { $this->mPassword = $this->mNewpassword = ''; $this->mRights = array(); // Getting user defaults only if we have an available language - if(isset($wgLang)) { $this->loadDefaultFromLanguage(); } + if(isset($wgContLang)) { $this->loadDefaultFromLanguage(); } foreach ($wgNamespacesToBeSearchedDefault as $nsnum => $val) { $this->mOptions['searchNs'.$nsnum] = $val; @@ -817,7 +817,7 @@ class User { } function getPageRenderingHash() { - global $wgLang; + global $wgContLang; if( $this->mHash ){ return $this->mHash; } @@ -836,7 +836,7 @@ class User { // add in language variant option if there are multiple variants // supported by the language object - if(sizeof($wgLang->getVariants())>1) { + if(sizeof($wgContLang->getVariants())>1) { $confstr .= '!' . $this->getOption( 'variant' ); }