Add config to enable compact links for new accounts
By default the value is false. Change-Id: I30e9c3d929158d9ebe90edfcb10c90712ad294f9
This commit is contained in:
@@ -82,6 +82,19 @@ class UniversalLanguageSelectorHooks {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets user preference to enable the Compact language links if the
|
||||
* user account is new.
|
||||
*
|
||||
* To be removed once no longer needed.
|
||||
*/
|
||||
public static function onLocalUserCreated( User $user, $autoCreate ) {
|
||||
if ( RequestContext::getMain()->getConfig()->get( 'ULSCompactLinksForNewAccounts' ) ) {
|
||||
$user->setOption( 'compact-language-links', 1 );
|
||||
$user->saveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OutputPage $out
|
||||
* @param Skin $skin
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"EventLoggingRegisterSchemas": "UniversalLanguageSelectorHooks::onEventLoggingRegisterSchemas",
|
||||
"GetBetaFeaturePreferences": "UniversalLanguageSelectorHooks::onGetBetaFeaturePreferences",
|
||||
"GetPreferences": "UniversalLanguageSelectorHooks::onGetPreferences",
|
||||
"LocalUserCreated": "UniversalLanguageSelectorHooks::onLocalUserCreated",
|
||||
"MakeGlobalVariablesScript": "UniversalLanguageSelectorHooks::addVariables",
|
||||
"PersonalUrls": "UniversalLanguageSelectorHooks::addPersonalBarTrigger",
|
||||
"ResourceLoaderGetConfigVars": "UniversalLanguageSelectorHooks::addConfig",
|
||||
@@ -92,7 +93,9 @@
|
||||
"@ULSFontRepositoryBasePath": "Base path of ULS font repository. If not set, will be set to 'UniversalLanguageSelector/data/fontrepo/fonts/', relative to $wgExtensionAssetsPath. @since 2013.10",
|
||||
"ULSFontRepositoryBasePath": false,
|
||||
"ULSCompactLanguageLinksBetaFeature": true,
|
||||
"@ULSCompactLanguageLinksBetaFeature": "Set compact interlanguage links as beta feature or not. If set false, compact interlanguage links will be available by default to all users."
|
||||
"@ULSCompactLanguageLinksBetaFeature": "Set compact interlanguage links as beta feature or not. If set false, compact interlanguage links will be available by default to all users.",
|
||||
"ULSCompactLinksForNewAccounts": false,
|
||||
"@ULSCompactLinksForNewAccounts": "Enable compact interlanguage links for new user accounts."
|
||||
},
|
||||
"callback": "UniversalLanguageSelectorHooks::setVersionConstant",
|
||||
"ResourceModules": {
|
||||
|
||||
Reference in New Issue
Block a user