Only show leading message if it's not being transcluded

Bug: T356842
Change-Id: Ib6d75b4d4a281a39274dd9904c0a1462c57a5085
This commit is contained in:
BlankEclair 2024-12-13 16:18:03 +11:00
parent 54902149bc
commit ba916449b3
No known key found for this signature in database
GPG key ID: 6F0877E28B7FE933

View file

@ -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() );