mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 02:00:57 +00:00
Merge "Preserve a user's beta preference when not in beta"
This commit is contained in:
commit
90f2bbfe87
|
@ -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