From 98f0bb42bdffeb511372c437bfd50578b62bdaa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 7 Oct 2020 14:11:39 +0200 Subject: [PATCH] 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 --- extension.json | 9 --------- includes/UniversalLanguageSelectorHooks.php | 20 -------------------- 2 files changed, 29 deletions(-) diff --git a/extension.json b/extension.json index 4d78d8d7..891e9cba 100644 --- a/extension.json +++ b/extension.json @@ -24,7 +24,6 @@ "EnterMobileMode": "UniversalLanguageSelectorHooks::onEnterMobileMode", "GetBetaFeaturePreferences": "UniversalLanguageSelectorHooks::onGetBetaFeaturePreferences", "GetPreferences": "UniversalLanguageSelectorHooks::onGetPreferences", - "LocalUserCreated": "UniversalLanguageSelectorHooks::onLocalUserCreated", "MakeGlobalVariablesScript": "UniversalLanguageSelectorHooks::addVariables", "PersonalUrls": "UniversalLanguageSelectorHooks::addPersonalBarTrigger", "ResourceLoaderGetConfigVars": "UniversalLanguageSelectorHooks::addConfig", @@ -130,14 +129,6 @@ "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.", "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", diff --git a/includes/UniversalLanguageSelectorHooks.php b/includes/UniversalLanguageSelectorHooks.php index 5b1ce208..a532d416 100644 --- a/includes/UniversalLanguageSelectorHooks.php +++ b/includes/UniversalLanguageSelectorHooks.php @@ -64,7 +64,6 @@ class UniversalLanguageSelectorHooks { */ private static function isCompactLinksEnabled( User $user ) { global $wgULSEnable, $wgInterwikiMagic, - $wgULSCompactLinksEnableAnon, $wgHideInterlanguageLinks, $wgULSCompactLanguageLinksBetaFeature; // Whether any user visible features are enabled @@ -72,10 +71,6 @@ class UniversalLanguageSelectorHooks { return false; } - if ( $user->isAnon() && $wgULSCompactLinksEnableAnon ) { - return true; - } - if ( $wgULSCompactLanguageLinksBetaFeature === true && $wgInterwikiMagic === true && $wgHideInterlanguageLinks === false && @@ -96,21 +91,6 @@ 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. - * @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 Skin $skin