Index: trunk/extensions/ConfirmEdit/ReCaptcha.php |
— | — | @@ -97,10 +97,10 @@ |
98 | 98 | return false; |
99 | 99 | } |
100 | 100 | |
101 | | - $recaptcha_response = |
| 101 | + |
102 | 102 | recaptcha_check_answer ( |
103 | 103 | $wgReCaptchaPrivateKey, |
104 | | - wfGetIP (), |
| 104 | + $wgRequest->getIP(), |
105 | 105 | $challenge, |
106 | 106 | $response |
107 | 107 | ); |
Index: trunk/extensions/ConfirmEdit/Captcha.php |
— | — | @@ -177,8 +177,12 @@ |
178 | 178 | */ |
179 | 179 | function isIPWhitelisted() { |
180 | 180 | global $wgCaptchaWhitelistIP; |
| 181 | + |
181 | 182 | if ( $wgCaptchaWhitelistIP ) { |
182 | | - $ip = wfGetIp(); |
| 183 | + global $wgRequest; |
| 184 | + |
| 185 | + $ip = $wgRequest->getIP(); |
| 186 | + |
183 | 187 | foreach ( $wgCaptchaWhitelistIP as $range ) { |
184 | 188 | if ( IP::isInRange( $ip, $range ) ) { |
185 | 189 | return true; |
— | — | @@ -194,7 +198,8 @@ |
195 | 199 | * @access private |
196 | 200 | */ |
197 | 201 | function badLoginKey() { |
198 | | - return wfMemcKey( 'captcha', 'badlogin', 'ip', wfGetIP() ); |
| 202 | + global $wgRequest; |
| 203 | + return wfMemcKey( 'captcha', 'badlogin', 'ip', $wgRequest->getIP() ); |
199 | 204 | } |
200 | 205 | |
201 | 206 | /** |