Don't show new topic tool empty state on existing non-talk pages

Bug: T312599
Change-Id: Ie691498f7b89cb34a414cb8dfae9337f1b706685
This commit is contained in:
Bartosz Dziewoński 2022-07-28 01:57:32 +02:00
parent 131f00c464
commit 34e755c623

View file

@ -205,7 +205,7 @@ class PageHooks implements
);
}
if ( HookUtils::isFeatureEnabledForOutput( $output, HookUtils::NEWTOPICTOOL ) ) {
if ( CommentFormatter::isEmptyTalkPage( $text ) ) {
if ( CommentFormatter::isEmptyTalkPage( $text ) && $output->getTitle()->isTalkPage() ) {
$output->enableOOUI();
$text = CommentFormatter::appendToEmptyTalkPage(
$text, $this->getEmptyStateHtml( $output->getContext() )