ToastFreeware
/
toast
/
cookiecaptcha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix < 1.19 compat, or at least some of it :)
[toast/cookiecaptcha.git]
/
ReCaptcha.class.php
diff --git
a/ReCaptcha.class.php
b/ReCaptcha.class.php
index b0c15fbda2edc1c9539acbaa08277986c29391ae..a041aeb1309fadac874655408f95bcb9c67445db 100644
(file)
--- a/
ReCaptcha.class.php
+++ b/
ReCaptcha.class.php
@@
-36,9
+36,12
@@
class ReCaptcha extends SimpleCaptcha {
return false;
}
return false;
}
+ // Compat: WebRequest::getIP is only available since MW 1.19.
+ $ip = method_exists( $wgRequest, 'getIP' ) ? $wgRequest->getIP() : wfGetIP();
+
$recaptcha_response = recaptcha_check_answer(
$wgReCaptchaPrivateKey,
$recaptcha_response = recaptcha_check_answer(
$wgReCaptchaPrivateKey,
- $
wgRequest->getIP()
,
+ $
ip
,
$challenge,
$response
);
$challenge,
$response
);