mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
Show createpage preference only when feature is available
Bug: T310053 Change-Id: I13262ecbe2d2c45c0ffb8706da17bc806ab2a5b7
This commit is contained in:
parent
790ef19cd3
commit
edb276e047
|
@ -83,22 +83,22 @@ class PreferenceHooks implements
|
|||
'help-message' => "discussiontools-preference-$feature-help",
|
||||
'section' => 'editing/discussion',
|
||||
];
|
||||
}
|
||||
|
||||
// Option to enable/disable new topic tool on pages that haven't been created
|
||||
// (it's inside this loop to place the options in a nice order)
|
||||
if ( $feature === HookUtils::NEWTOPICTOOL ) {
|
||||
$preferences["discussiontools-newtopictool-createpage"] = [
|
||||
'type' => 'radio',
|
||||
'cssclass' => 'mw-htmlform-checkradio-indent',
|
||||
'label-message' => 'discussiontools-preference-newtopictool-createpage',
|
||||
'options-messages' => [
|
||||
'discussiontools-preference-newtopictool-createpage-newtopictool' => 1,
|
||||
'discussiontools-preference-newtopictool-createpage-editor' => 0,
|
||||
],
|
||||
'disable-if' => [ '===', 'discussiontools-' . HookUtils::NEWTOPICTOOL, '' ],
|
||||
'section' => 'editing/discussion',
|
||||
];
|
||||
// Option to enable/disable new topic tool on pages that haven't been created
|
||||
// (it's inside this loop to place the options in a nice order)
|
||||
if ( $feature === HookUtils::NEWTOPICTOOL ) {
|
||||
$preferences["discussiontools-newtopictool-createpage"] = [
|
||||
'type' => 'radio',
|
||||
'cssclass' => 'mw-htmlform-checkradio-indent',
|
||||
'label-message' => 'discussiontools-preference-newtopictool-createpage',
|
||||
'options-messages' => [
|
||||
'discussiontools-preference-newtopictool-createpage-newtopictool' => 1,
|
||||
'discussiontools-preference-newtopictool-createpage-editor' => 0,
|
||||
],
|
||||
'disable-if' => [ '===', 'discussiontools-' . HookUtils::NEWTOPICTOOL, '' ],
|
||||
'section' => 'editing/discussion',
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue