mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Nuke
synced 2024-11-13 18:26:55 +00:00
Don't show link to Nuke for IP ranges
Bug: T175915 Change-Id: Idc73e18e3665380147f85ad27b484fade5e877a2
This commit is contained in:
parent
2b4e631b8b
commit
4f9f576d98
|
@ -13,13 +13,13 @@ class NukeHooks {
|
|||
public static function nukeContributionsLinks( $userId, $userPageTitle, &$toolLinks,
|
||||
SpecialPage $sp
|
||||
) {
|
||||
if ( $sp->getUser()->isAllowed( 'nuke' ) ) {
|
||||
$username = $userPageTitle->getText();
|
||||
if ( $sp->getUser()->isAllowed( 'nuke' ) && !IP::isValidRange( $username ) ) {
|
||||
$toolLinks['nuke'] = $sp->getLinkRenderer()->makeKnownLink(
|
||||
SpecialPage::getTitleFor( 'Nuke' ),
|
||||
$sp->msg( 'nuke-linkoncontribs' )->text(),
|
||||
[ 'title' => $sp->msg( 'nuke-linkoncontribs-text',
|
||||
$userPageTitle->getText() )->text() ],
|
||||
[ 'target' => $userPageTitle->getText() ]
|
||||
[ 'title' => $sp->msg( 'nuke-linkoncontribs-text', $username )->text() ],
|
||||
[ 'target' => $username ]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue