mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-09-24 10:58:20 +00:00
Only show the empty state on talk namespaces
This should only affect some edge cases like the project namespace (e.g. Wikipedia:Village_pump isn't a talk page, but does get discussiontools.) Bug: T288317 Change-Id: I509101063a1d64d09cff71a84bf48c69ab7a8c08
This commit is contained in:
parent
076242e3b4
commit
93f2e64f3f
|
@ -201,8 +201,11 @@ class PageHooks implements
|
|||
}
|
||||
$context = $article->getContext();
|
||||
$output = $context->getOutput();
|
||||
if ( !HookUtils::isFeatureEnabledForOutput( $output, HookUtils::NEWTOPICTOOL ) ) {
|
||||
// Our empty states are all about using the new topic tool
|
||||
if ( !HookUtils::isFeatureEnabledForOutput( $output, HookUtils::NEWTOPICTOOL ) || !$title->isTalkPage() ) {
|
||||
// Our empty states are all about using the new topic tool, but
|
||||
// expect to be on a talk page, so fall back if it's not
|
||||
// available or if we're in a non-talk namespace that still has
|
||||
// DT features enabled
|
||||
return true;
|
||||
}
|
||||
$output->enableOOUI();
|
||||
|
|
Loading…
Reference in a new issue