require_once( "$IP/languages/Language.php" );
-wfProfileOut( $fname.'-language1' );
-wfProfileIn( $fname.'-User' );
-
-# Skin setup functions
-# Entries can be added to this variable during the inclusion
-# of the extension file. Skins can then perform any necessary initialisation.
-foreach ( $wgSkinExtensionFunctions as $func ) {
- $func();
-}
-
-if( !is_object( $wgAuth ) ) {
- require_once( 'AuthPlugin.php' );
- $wgAuth = new AuthPlugin();
-}
-
-if( $wgCommandLineMode ) {
- # Used for some maintenance scripts; user session cookies can screw things up
- # when the database is in an in-between state.
- $wgUser = new User();
- # Prevent loading User settings from the DB.
- $wgUser->setLoaded( true );
-} else {
- $wgUser = User::loadFromSession();
-}
-
-wfProfileOut( $fname.'-User' );
-wfProfileIn( $fname.'-language2' );
-
function setupLangObj(&$langclass) {
global $IP;
$wgContLang = setupLangObj( $wgContLangClass );
$wgContLang->initEncoding();
-// set default user option from content language
-if( !$wgUser->mDataLoaded ) {
- $wgUser->loadDefaultFromLanguage();
+wfProfileOut( $fname.'-language1' );
+wfProfileIn( $fname.'-User' );
+
+# Skin setup functions
+# Entries can be added to this variable during the inclusion
+# of the extension file. Skins can then perform any necessary initialisation.
+foreach ( $wgSkinExtensionFunctions as $func ) {
+ $func();
+}
+
+if( !is_object( $wgAuth ) ) {
+ require_once( 'AuthPlugin.php' );
+ $wgAuth = new AuthPlugin();
}
+if( $wgCommandLineMode ) {
+ # Used for some maintenance scripts; user session cookies can screw things up
+ # when the database is in an in-between state.
+ $wgUser = new User();
+ # Prevent loading User settings from the DB.
+ $wgUser->setLoaded( true );
+} else {
+ $wgUser = User::loadFromSession();
+}
+
+wfProfileOut( $fname.'-User' );
+wfProfileIn( $fname.'-language2' );
+
// wgLanguageCode now specifically means the UI language
$wgLanguageCode = $wgUser->getOption('language');
# Validate $wgLanguageCode, which will soon be sent to an eval()
$this->mPassword = $this->mNewpassword = '';
$this->mRights = array();
$this->mGroups = array();
- // Getting user defaults only if we have an available language
- if( isset( $wgContLang ) ) {
- $this->loadDefaultFromLanguage();
- }
+ $this->mOptions = User::getDefaultOptions();
foreach( $wgNamespacesToBeSearchedDefault as $nsnum => $val ) {
$this->mOptions['searchNs'.$nsnum] = $val;
wfProfileOut( $fname );
}
-
- /**
- * Used to load user options from a language.
- * This is not in loadDefault() cause we sometime create user before having
- * a language object.
- */
- function loadDefaultFromLanguage(){
- $this->mOptions = User::getDefaultOptions();
- }
/**
* Combine the language default options with any site-specific options