From 34e755c6239e79eba0c3b230c32e2709e7c1f63f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 28 Jul 2022 01:57:32 +0200 Subject: [PATCH] Don't show new topic tool empty state on existing non-talk pages Bug: T312599 Change-Id: Ie691498f7b89cb34a414cb8dfae9337f1b706685 --- includes/Hooks/PageHooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Hooks/PageHooks.php b/includes/Hooks/PageHooks.php index a3ea5364e..40f207cd1 100644 --- a/includes/Hooks/PageHooks.php +++ b/includes/Hooks/PageHooks.php @@ -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() )