Steps to reproduce:
- have advanced user rights and go to Special:Contributions
- choose "Show contributions of new accounts only" and "Deleted only"
- examine rows with deleted user names, marked with
"[username or IP address removed - edit hidden from contributions]"
All these rows have a red "(talk)" link which links to "User talk:"
(that's all). More detailed examination reveals an empty <a> element
which is supposed to link to the user page.
As these rows have the mentioned marker, we can just skip generating
user link if the user name is hidden.
Change-Id: I4fc7fb7ad2836834e9436ca2acb6b12484c15172
}
# Show user names for /newbies as there may be different users.
- # Note that we already excluded rows with hidden user names.
- if ( $this->contribs == 'newbie' ) {
+ # Note that only unprivileged users have rows with hidden user names excluded.
+ $userlink = '';
+ if ( $this->contribs == 'newbie' && !$rev->isDeleted( Revision::DELETED_USER ) ) {
$userlink = ' . . ' . $lang->getDirMark()
. Linker::userLink( $rev->getUser(), $rev->getUserText() );
$userlink .= ' ' . $this->msg( 'parentheses' )->rawParams(
- Linker::userTalkLink( $rev->getUser(), $rev->getUserText() ) )->escaped() . ' ';
- } else {
- $userlink = '';
+ Linker::userTalkLink( $rev->getUser(), $rev->getUserText() ) )->escaped() . ' ';
}
$flags = [];