mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
Preserve a user's beta preference when not in beta
The tool may go in and out of beta as new features are release/graduated to opt-out. Users should only need to opt in to the beta feature once to get all future sub-features. Bug: T272071 Change-Id: If6834b7fc07fc7e84757dc5fdcea814cd0d65936
This commit is contained in:
parent
c42e86f0f6
commit
1c741d3450
|
@ -393,6 +393,19 @@ class Hooks {
|
|||
'type' => 'api',
|
||||
];
|
||||
|
||||
$dtConfig = MediaWikiServices::getInstance()->getConfigFactory()
|
||||
->makeConfig( 'discussiontools' );
|
||||
if (
|
||||
!$dtConfig->get( 'DiscussionToolsEnable' ) ||
|
||||
!$dtConfig->get( 'DiscussionToolsBeta' )
|
||||
) {
|
||||
// When out of beta, preserve the user preference in case we
|
||||
// bring back the beta feature for a new sub-feature. (T272071)
|
||||
$preferences['discussiontools-betaenable'] = [
|
||||
'type' => 'api'
|
||||
];
|
||||
}
|
||||
|
||||
$preferences['discussiontools-editmode'] = [
|
||||
'type' => 'api',
|
||||
'validation-callback' => function ( $value ) {
|
||||
|
|
Loading…
Reference in a new issue