mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Nuke
synced 2024-11-14 19:31:29 +00:00
Replace deprecated IP class with IPUtils
Raise required MW version to >= 1.35.0 Bug: T242556 Change-Id: I1a61cf5e1a66fcde3edd5b010eb8c34de4b47dc3
This commit is contained in:
parent
1c7e5930a2
commit
2ae6a87f6a
|
@ -9,7 +9,7 @@
|
|||
"descriptionmsg": "nuke-desc",
|
||||
"license-name": "GPL-2.0-or-later",
|
||||
"requires": {
|
||||
"MediaWiki": ">= 1.28.1"
|
||||
"MediaWiki": ">= 1.35.0"
|
||||
},
|
||||
"type": "specialpage",
|
||||
"ExtensionMessagesFiles": {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Wikimedia\IPUtils;
|
||||
|
||||
class NukeHooks {
|
||||
|
||||
/**
|
||||
|
@ -14,7 +16,7 @@ class NukeHooks {
|
|||
SpecialPage $sp
|
||||
) {
|
||||
$username = $userPageTitle->getText();
|
||||
if ( $sp->getUser()->isAllowed( 'nuke' ) && !IP::isValidRange( $username ) ) {
|
||||
if ( $sp->getUser()->isAllowed( 'nuke' ) && !IPUtils::isValidRange( $username ) ) {
|
||||
$toolLinks['nuke'] = $sp->getLinkRenderer()->makeKnownLink(
|
||||
SpecialPage::getTitleFor( 'Nuke' ),
|
||||
$sp->msg( 'nuke-linkoncontribs' )->text(),
|
||||
|
|
Loading…
Reference in a new issue