Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/230252

Change subject: Avoid use of deprecated wfGetIP()
......................................................................

Avoid use of deprecated wfGetIP()

Change-Id: I2be6644e14b63a6041efb3d9d4fd4dd7451a22ba
---
M InterwikiIntegrationRecentChange.php
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InterwikiIntegration 
refs/changes/52/230252/1

diff --git a/InterwikiIntegrationRecentChange.php 
b/InterwikiIntegrationRecentChange.php
old mode 100644
new mode 100755
index 8662eb3..e3ef74d
--- a/InterwikiIntegrationRecentChange.php
+++ b/InterwikiIntegrationRecentChange.php
@@ -326,8 +326,10 @@
        public static function notifyEdit( $timestamp, &$title, $minor, &$user, 
$comment, $oldId,
                $lastTimestamp, $bot, $ip='', $oldSize=0, $newSize=0, $newId=0, 
$patrol=0 )
        {
+               global $wgRequest;
+
                if( !$ip ) {
-                       $ip = wfGetIP();
+                       $ip = $wgRequest->getIP()
                        if( !$ip ) $ip = '';
                }
 
@@ -378,8 +380,10 @@
        public static function notifyNew( $timestamp, &$title, $minor, &$user, 
$comment, $bot,
                $ip='', $size=0, $newId=0, $patrol=0 )
        {
+               global $wgRequest;
+
                if( !$ip ) {
-                       $ip = wfGetIP();
+                       $ip = $wgRequest->getIP();
                        if( !$ip ) $ip = '';
                }
 
@@ -427,7 +431,7 @@
        {
                global $wgRequest;
                if( !$ip ) {
-                       $ip = wfGetIP();
+                       $ip = $wgRequest->getIP();
                        if( !$ip ) $ip = '';
                }
 
@@ -495,7 +499,7 @@
        {
                global $wgRequest;
                if( !$ip ) {
-                       $ip = wfGetIP();
+                       $ip = $wgRequest->getIP();
                        if( !$ip ) $ip = '';
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/230252
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2be6644e14b63a6041efb3d9d4fd4dd7451a22ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InterwikiIntegration
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to