Seb35 has uploaded a new change for review. https://gerrit.wikimedia.org/r/161677
Change subject: Unset the preference key before adding it ...................................................................... Unset the preference key before adding it Some extensions have a dual mechanism to enable them, in the classical framework (GetPreferences) and in the BetaFeatures framework (GetBetaFeaturePreferences). This ensures the BF description is added at the end of the $prefs array instead of reusing the place of the previous key, dirupting the order in the BF tab. Bug: 71088 Change-Id: Icefb9492872451fa43ac6258e8f6b0302d81ccbd --- M BetaFeaturesHooks.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BetaFeatures refs/changes/77/161677/1 diff --git a/BetaFeaturesHooks.php b/BetaFeaturesHooks.php index 4f40363..b1d5bd5 100644 --- a/BetaFeaturesHooks.php +++ b/BetaFeaturesHooks.php @@ -239,6 +239,9 @@ $opt['user-count'] = $counts[$key]; } + // Set the beta feature in the standard preferences array + // Just before, unset the key to resort it in the array, in the case the key was already set + unset( $prefs[$key] ); $prefs[$key] = $opt; $currentValue = $user->getOption( $key ); -- To view, visit https://gerrit.wikimedia.org/r/161677 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icefb9492872451fa43ac6258e8f6b0302d81ccbd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BetaFeatures Gerrit-Branch: master Gerrit-Owner: Seb35 <seb35wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits