mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-16 20:58:28 +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();
|
$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();
|
||||||
|
|
Loading…
Reference in a new issue