MediaWiki
REL1_31
NukeHooks.php
Go to the documentation of this file.
1
<?php
2
3
class
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
}
NukeHooks
Definition
NukeHooks.php:3
NukeHooks\nukeContributionsLinks
static nukeContributionsLinks( $userId, $userPageTitle, &$toolLinks, SpecialPage $sp)
Shows link to Special:Nuke on Special:Contributions/username if applicable.
Definition
NukeHooks.php:13
SpecialPage
Parent class for all special pages.
Definition
SpecialPage.php:36
$username
this hook is for auditing only or null if authentication failed before getting that far $username
Definition
hooks.txt:785
extensions
Nuke
includes
NukeHooks.php
Generated on Mon Nov 25 2024 15:34:20 for MediaWiki by
1.10.0