mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-09-28 21:06:25 +00:00
Merge "Only show the empty state on talk namespaces"
This commit is contained in:
commit
dfa2646604
|
@ -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