mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-23 16:06:53 +00:00
Merge "PreferenceHooks: Avoid referring to the field of disabled feature"
This commit is contained in:
commit
fb7a25ce91
|
@ -125,7 +125,10 @@ class PreferenceHooks implements
|
|||
// (both reply tool and new topic tool are disabled)
|
||||
$preferences['discussiontools-' . HookUtils::SOURCEMODETOOLBAR]['disable-if'] = [ 'AND' ];
|
||||
|
||||
if ( isset( $preferences['discussiontools-' . HookUtils::REPLYTOOL] ) ) {
|
||||
if ( isset( $preferences['discussiontools-' . HookUtils::REPLYTOOL] ) &&
|
||||
// GlobalPreferences extension would delete disabled fields, avoid referring to it.
|
||||
!( $preferences['discussiontools-' . HookUtils::REPLYTOOL]['disabled'] ?? false )
|
||||
) {
|
||||
$preferences['discussiontools-' . HookUtils::SOURCEMODETOOLBAR]['disable-if'][] = [
|
||||
'===', 'discussiontools-' . HookUtils::REPLYTOOL, ''
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue