mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
Add config to separate out visualenhancements on mobile
Follow-up to d0126ce6de
which made them
default-on for all mobile. These two taken together mean that the
mobile visual enhancement features now *only* depend on this config,
rather than on whether the individual features are enabled on desktop.
Bug: T318871
Change-Id: If767753e6d33f19bbc540d4e74273e478198388c
This commit is contained in:
parent
f910e54802
commit
d5161bf086
|
@ -604,6 +604,10 @@
|
|||
"value": true,
|
||||
"description": "Enable DiscussionTools on mobile talk pages. Currently this automatically enables 'replytool', 'newtopictool' & 'sourcemodetoolbar' on those pages and disables topic subscriptions on those pages."
|
||||
},
|
||||
"DiscussionToolsEnableMobile_visualenhancements": {
|
||||
"value": true,
|
||||
"description": "Enable DiscussionTools visual enhancements on mobile talk pages, if DiscussionTools itself is enabled. Currently this automatically enables 'visualenhancements', 'visualenhancements_reply', and 'visualenhancements_pageframe'."
|
||||
},
|
||||
"DiscussionTools_replytool": {
|
||||
"value": "default",
|
||||
"description": "Override availability of DiscussionTools reply tool. 'default', 'available', or 'unavailable'."
|
||||
|
|
|
@ -391,9 +391,16 @@ class HookUtils {
|
|||
// Even though mobile ignores user preferences, TOPICSUBSCRIPTION must
|
||||
// still be disabled if the user isn't registered.
|
||||
( $feature === static::TOPICSUBSCRIPTION && $output->getUser()->isRegistered() ) ||
|
||||
// Even though mobile ignores user preferences, VISUALENHANCEMENTS must
|
||||
// still be disabled if is unavailable on the wiki.
|
||||
(
|
||||
(
|
||||
$feature === static::VISUALENHANCEMENTS ||
|
||||
$feature === static::VISUALENHANCEMENTS_REPLY ||
|
||||
$feature === static::VISUALENHANCEMENTS_PAGEFRAME
|
||||
) &&
|
||||
$dtConfig->get( 'DiscussionToolsEnableMobile_visualenhancements' )
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue