MediaWiki REL1_31
NukeHooks.php
Go to the documentation of this file.
1<?php
2
3class NukeHooks {
4
13 public static function nukeContributionsLinks( $userId, $userPageTitle, &$toolLinks,
14 SpecialPage $sp
15 ) {
16 $username = $userPageTitle->getText();
17 if ( $sp->getUser()->isAllowed( 'nuke' ) && !IP::isValidRange( $username ) ) {
18 $toolLinks['nuke'] = $sp->getLinkRenderer()->makeKnownLink(
19 SpecialPage::getTitleFor( 'Nuke' ),
20 $sp->msg( 'nuke-linkoncontribs' )->text(),
21 [ 'title' => $sp->msg( 'nuke-linkoncontribs-text', $username )->text() ],
22 [ 'target' => $username ]
23 );
24 }
25 }
26}
static nukeContributionsLinks( $userId, $userPageTitle, &$toolLinks, SpecialPage $sp)
Shows link to Special:Nuke on Special:Contributions/username if applicable.
Definition NukeHooks.php:13
Parent class for all special pages.
this hook is for auditing only or null if authentication failed before getting that far $username
Definition hooks.txt:785