r106098 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106097‎ | r106098 | r106099 >
Date:21:24, 13 December 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
kill wfGetIP
Modified paths:
  • /trunk/extensions/SemanticSignup/includes/SES_Special.php (modified) (history)
  • /trunk/extensions/SemanticSignup/includes/SES_UserAccountDataChecker.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticSignup/includes/SES_Special.php
@@ -47,10 +47,10 @@
4848 }
4949
5050 global $wgAccountCreationThrottle;
51 - global $wgUser;
 51+ global $wgUser, $wgRequest;
5252
5353 if ( $wgAccountCreationThrottle && $wgUser->isPingLimitable() ) {
54 - $key = wfMemcKey( 'acctcreate', 'ip', wfGetIP() );
 54+ $key = wfMemcKey( 'acctcreate', 'ip', $wgRequest->getIP() );
5555 $value = $wgMemc->incr( $key );
5656
5757 if ( !$value ) {
Index: trunk/extensions/SemanticSignup/includes/SES_UserAccountDataChecker.php
@@ -71,8 +71,8 @@
7272 public function checkSorbs()
7373 {
7474 global $wgProxyWhitelist;
75 - global $wgEnableSorbs;
76 - $ip = wfGetIP();
 75+ global $wgEnableSorbs, $wgRequest;
 76+ $ip = $wgRequest->getIP();
7777 if ( $wgEnableSorbs && !in_array( $ip, $wgProxyWhitelist ) &&
7878 $wgUser->inSorbsBlacklist( $ip ) )
7979 $this->error( wfMsg( 'sorbs_create_account_reason' ) );

Status & tagging log