summaryrefslogtreecommitdiff
path: root/extensions/ConfirmEdit/ReCaptcha.class.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
commit63601400e476c6cf43d985f3e7b9864681695ed4 (patch)
treef7846203a952e38aaf66989d0a4702779f549962 /extensions/ConfirmEdit/ReCaptcha.class.php
parent8ff01378c9e0207f9169b81966a51def645b6a51 (diff)
Update to MediaWiki 1.20.2
this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'extensions/ConfirmEdit/ReCaptcha.class.php')
-rw-r--r--extensions/ConfirmEdit/ReCaptcha.class.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/extensions/ConfirmEdit/ReCaptcha.class.php b/extensions/ConfirmEdit/ReCaptcha.class.php
index a041aeb1..59b31f47 100644
--- a/extensions/ConfirmEdit/ReCaptcha.class.php
+++ b/extensions/ConfirmEdit/ReCaptcha.class.php
@@ -36,8 +36,7 @@ class ReCaptcha extends SimpleCaptcha {
return false;
}
- // Compat: WebRequest::getIP is only available since MW 1.19.
- $ip = method_exists( $wgRequest, 'getIP' ) ? $wgRequest->getIP() : wfGetIP();
+ $ip = $wgRequest->getIP();
$recaptcha_response = recaptcha_check_answer(
$wgReCaptchaPrivateKey,
@@ -70,16 +69,16 @@ class ReCaptcha extends SimpleCaptcha {
* Show a message asking the user to enter a captcha on edit
* The result will be treated as wiki text
*
- * @param $action Action being performed
+ * @param $action string Action being performed
* @return string
*/
function getMessage( $action ) {
$name = 'recaptcha-' . $action;
- $text = wfMsg( $name );
+ $text = wfMessage( $name )->text();
# Obtain a more tailored message, if possible, otherwise, fall back to
# the default for edits
- return wfEmptyMsg( $name, $text ) ? wfMsg( 'recaptcha-edit' ) : $text;
+ return wfMessage( $name, $text )->isDisabled() ? wfMessage( 'recaptcha-edit' )->text() : $text;
}
public function APIGetAllowedParams( &$module, &$params ) {