jenkins-bot has submitted this change and it was merged.
Change subject: Change methods to be static
......................................................................
Change methods to be static
Bug: T70716
Change-Id: I4ace3333cf6a8b7a5f9472503c2052c4b3ec95e8
---
M AutoProxyBlock.body.php
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
TTO: Looks good to me, approved
jenkins-bot: Verified
diff --git a/AutoProxyBlock.body.php b/AutoProxyBlock.body.php
index b3b8d94..a8b9340 100644
--- a/AutoProxyBlock.body.php
+++ b/AutoProxyBlock.body.php
@@ -1,7 +1,7 @@
<?php
class AutoProxyBlock {
- function isProxy( $ip ) {
+ static function isProxy( $ip ) {
global $wgMemc, $wgAutoProxyBlockSources;
$memcKey = wfMemcKey( 'isproxy', $ip );
@@ -19,7 +19,6 @@
'bklimit' => '1',
'bkprop' => 'expiry|reason',
);
-
$ban = self::requestForeighAPI($url,
$request_options);
if( isset($ban['query']['blocks'][0])
&& preg_match($wgAutoProxyBlockSources['key'],
$ban['query']['blocks'][0]['reason']) ) {
$wgMemc->set( $memcKey,
'proxy', 60 * 60 * 24 );
@@ -52,7 +51,7 @@
}
}
- function checkProxy( $title, $user, $action, &$result ) {
+ static function checkProxy( $title, $user, $action, &$result ) {
global $wgProxyCanPerform, $wgAutoProxyBlockLog, $wgRequest;
if( in_array( $action, $wgProxyCanPerform ) ||
$user->isAllowed('proxyunbannable') ) {
--
To view, visit https://gerrit.wikimedia.org/r/264587
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4ace3333cf6a8b7a5f9472503c2052c4b3ec95e8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/AutoProxyBlock
Gerrit-Branch: master
Gerrit-Owner: Victorbarbu <[email protected]>
Gerrit-Reviewer: TTO <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits