From ba916449b33506d004a6195ff26214984a6fe2d8 Mon Sep 17 00:00:00 2001 From: BlankEclair Date: Fri, 13 Dec 2024 16:18:03 +1100 Subject: [PATCH] Only show leading message if it's not being transcluded Bug: T356842 Change-Id: Ib6d75b4d4a281a39274dd9904c0a1462c57a5085 --- src/Editcount.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Editcount.php b/src/Editcount.php index da58ba1..1f1823a 100644 --- a/src/Editcount.php +++ b/src/Editcount.php @@ -16,8 +16,6 @@ class Editcount extends IncludableSpecialPage { $target = $par ?? $this->getRequest()->getText( 'username' ); [ $username, $namespace ] = $this->extractParameters( $target ); - $this->getOutput()->enableOOUI(); - $this->getOutput()->addWikiMsg( 'editcount-before' ); $user = User::newFromName( $username ); $username = $user ? $user->getName() : ''; @@ -37,6 +35,9 @@ class Editcount extends IncludableSpecialPage { // @phan-suppress-next-line SecurityCheck-XSS $this->getOutput()->addHTML( $out ); } else { + $this->getOutput()->enableOOUI(); + $this->getOutput()->addWikiMsg( 'editcount-before' ); + $nscount = $this->editsByNs( $user ); $html = new EditcountHTML; $html->setContext( $this->getContext() );