mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Nuke
synced 2024-12-23 21:33:09 +00:00
b094639112
Bug: 66182 Change-Id: Icc9439e043757bdda255f120e205559f2476dcff
28 lines
652 B
PHP
28 lines
652 B
PHP
<?php
|
|
|
|
class NukeHooks {
|
|
|
|
/**
|
|
* Shows link to Special:Nuke on Special:Contributions/username if applicable
|
|
*
|
|
* @param $userId Integer
|
|
* @param $userPageTitle Title
|
|
* @param $toolLinks Array
|
|
*
|
|
* @return true
|
|
*/
|
|
public static function nukeContributionsLinks( $userId, $userPageTitle, &$toolLinks ) {
|
|
global $wgUser;
|
|
|
|
if ( $wgUser->isAllowed( 'nuke' ) ) {
|
|
$toolLinks[] = Linker::link(
|
|
SpecialPage::getTitleFor( 'Nuke' ),
|
|
wfMessage( 'nuke-linkoncontribs' )->escaped(),
|
|
array( 'title' => wfMessage( 'nuke-linkoncontribs-text' )->text() ),
|
|
array( 'target' => $userPageTitle->getText() )
|
|
);
|
|
}
|
|
return true;
|
|
}
|
|
}
|