Remove ULSCompactLinksForNewAccounts and ULSCompactLinksEnableAnon
These are disabled by default and on production. They are only enabled in the beta cluster, which is not needed. Change-Id: Ifa847fd8a1f3d7d2695a7c1c4a1a93f136091604
This commit is contained in:
committed by
jenkins-bot
parent
e0e69d35b2
commit
98f0bb42bd
@@ -24,7 +24,6 @@
|
|||||||
"EnterMobileMode": "UniversalLanguageSelectorHooks::onEnterMobileMode",
|
"EnterMobileMode": "UniversalLanguageSelectorHooks::onEnterMobileMode",
|
||||||
"GetBetaFeaturePreferences": "UniversalLanguageSelectorHooks::onGetBetaFeaturePreferences",
|
"GetBetaFeaturePreferences": "UniversalLanguageSelectorHooks::onGetBetaFeaturePreferences",
|
||||||
"GetPreferences": "UniversalLanguageSelectorHooks::onGetPreferences",
|
"GetPreferences": "UniversalLanguageSelectorHooks::onGetPreferences",
|
||||||
"LocalUserCreated": "UniversalLanguageSelectorHooks::onLocalUserCreated",
|
|
||||||
"MakeGlobalVariablesScript": "UniversalLanguageSelectorHooks::addVariables",
|
"MakeGlobalVariablesScript": "UniversalLanguageSelectorHooks::addVariables",
|
||||||
"PersonalUrls": "UniversalLanguageSelectorHooks::addPersonalBarTrigger",
|
"PersonalUrls": "UniversalLanguageSelectorHooks::addPersonalBarTrigger",
|
||||||
"ResourceLoaderGetConfigVars": "UniversalLanguageSelectorHooks::addConfig",
|
"ResourceLoaderGetConfigVars": "UniversalLanguageSelectorHooks::addConfig",
|
||||||
@@ -130,14 +129,6 @@
|
|||||||
"ULSCompactLanguageLinksBetaFeature": {
|
"ULSCompactLanguageLinksBetaFeature": {
|
||||||
"description": "Set compact interlanguage links as beta feature or not. If set false, compact interlanguage links will be available by default to all users.",
|
"description": "Set compact interlanguage links as beta feature or not. If set false, compact interlanguage links will be available by default to all users.",
|
||||||
"value": true
|
"value": true
|
||||||
},
|
|
||||||
"ULSCompactLinksForNewAccounts": {
|
|
||||||
"description": "Enable compact interlanguage links for new user accounts.",
|
|
||||||
"value": false
|
|
||||||
},
|
|
||||||
"ULSCompactLinksEnableAnon": {
|
|
||||||
"description": "Enable compact interlanguage links for anonymous users.",
|
|
||||||
"value": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"callback": "UniversalLanguageSelectorHooks::setVersionConstant",
|
"callback": "UniversalLanguageSelectorHooks::setVersionConstant",
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ class UniversalLanguageSelectorHooks {
|
|||||||
*/
|
*/
|
||||||
private static function isCompactLinksEnabled( User $user ) {
|
private static function isCompactLinksEnabled( User $user ) {
|
||||||
global $wgULSEnable, $wgInterwikiMagic,
|
global $wgULSEnable, $wgInterwikiMagic,
|
||||||
$wgULSCompactLinksEnableAnon,
|
|
||||||
$wgHideInterlanguageLinks, $wgULSCompactLanguageLinksBetaFeature;
|
$wgHideInterlanguageLinks, $wgULSCompactLanguageLinksBetaFeature;
|
||||||
|
|
||||||
// Whether any user visible features are enabled
|
// Whether any user visible features are enabled
|
||||||
@@ -72,10 +71,6 @@ class UniversalLanguageSelectorHooks {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $user->isAnon() && $wgULSCompactLinksEnableAnon ) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $wgULSCompactLanguageLinksBetaFeature === true &&
|
if ( $wgULSCompactLanguageLinksBetaFeature === true &&
|
||||||
$wgInterwikiMagic === true &&
|
$wgInterwikiMagic === true &&
|
||||||
$wgHideInterlanguageLinks === false &&
|
$wgHideInterlanguageLinks === false &&
|
||||||
@@ -96,21 +91,6 @@ class UniversalLanguageSelectorHooks {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets user preference to enable the Compact language links if the
|
|
||||||
* user account is new.
|
|
||||||
*
|
|
||||||
* To be removed once no longer needed.
|
|
||||||
* @param User $user
|
|
||||||
* @param bool $autoCreate
|
|
||||||
*/
|
|
||||||
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 OutputPage $out
|
||||||
* @param Skin $skin
|
* @param Skin $skin
|
||||||
|
|||||||
Reference in New Issue
Block a user