MediaWiki
REL1_32
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:815
extensions
Nuke
includes
NukeHooks.php
Generated on Mon Nov 25 2024 15:56:39 for MediaWiki by
1.10.0