mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Editcount
synced 2024-12-18 11:02:04 +00:00
Only show leading message if it's not being transcluded
Bug: T356842 Change-Id: Ib6d75b4d4a281a39274dd9904c0a1462c57a5085
This commit is contained in:
parent
54902149bc
commit
ba916449b3
|
@ -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() );
|
||||
|
|
Loading…
Reference in a new issue