mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
Enable visual enhancements on all talk namespaces
Bug: T325417 Change-Id: I099a7d03f059f08595dec43ff0205fd5ba765885
This commit is contained in:
parent
8c620473fb
commit
5c5073b5ba
|
@ -520,10 +520,6 @@
|
|||
"value": "default",
|
||||
"description": "Override availability of DiscussionTools visual enhancements. 'default', 'available', or 'unavailable'."
|
||||
},
|
||||
"DiscussionTools_visualenhancements_namespaces": {
|
||||
"value": [ 1, 3 ],
|
||||
"description": "Namespaces on which visual enhancements are available. Array of namespaces IDs (numbers), or `true` to enable on all namespaces/pages which have DiscussionTools."
|
||||
},
|
||||
"DiscussionTools_visualenhancements_pageframe": {
|
||||
"value": "default",
|
||||
"description": "Override availability of DiscussionTools visual enhancements's page frame sub-feature. 'default', 'available', or 'unavailable'."
|
||||
|
|
|
@ -330,12 +330,8 @@ class HookUtils {
|
|||
$services = MediaWikiServices::getInstance();
|
||||
|
||||
if ( $feature === static::VISUALENHANCEMENTS ) {
|
||||
$dtConfig = $services->getConfigFactory()->makeConfig( 'discussiontools' );
|
||||
$namespaces = $dtConfig->get( 'DiscussionTools_visualenhancements_namespaces' );
|
||||
if ( is_array( $namespaces ) ) {
|
||||
// Only allow visual enhancements in specified namespaces
|
||||
return in_array( $title->getNamespace(), $namespaces, true );
|
||||
}
|
||||
// Visual enhancements are only enabled on talk namespaces (T325417)
|
||||
return $title->isTalkPage();
|
||||
}
|
||||
|
||||
$hasNewSectionLink = static::hasPagePropCached( $title, 'newsectionlink' );
|
||||
|
|
Loading…
Reference in a new issue