Merge "Only show the empty state on talk namespaces"

This commit is contained in:
jenkins-bot 2021-08-07 16:19:16 +00:00 committed by Gerrit Code Review
commit dfa2646604

View file

@ -201,8 +201,11 @@ class PageHooks implements
} }
$context = $article->getContext(); $context = $article->getContext();
$output = $context->getOutput(); $output = $context->getOutput();
if ( !HookUtils::isFeatureEnabledForOutput( $output, HookUtils::NEWTOPICTOOL ) ) { if ( !HookUtils::isFeatureEnabledForOutput( $output, HookUtils::NEWTOPICTOOL ) || !$title->isTalkPage() ) {
// Our empty states are all about using the new topic tool // 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; return true;
} }
$output->enableOOUI(); $output->enableOOUI();