Jack Phoenix has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/392741 )
Change subject: Axing old reCAPTCHA support
......................................................................
Axing old reCAPTCHA support
Use $wgCaptchaTriggers['form'] to configure CAPTCHA for forms.
Change-Id: If38683947deb116b9edd2599b37c9f41a88c4f6b
---
M SpecialForm.php
M extension.json
M i18n/en.json
3 files changed, 0 insertions(+), 32 deletions(-)
Approvals:
Jack Phoenix: Verified; Looks good to me, approved
diff --git a/SpecialForm.php b/SpecialForm.php
index 710c51f..56921ca 100644
--- a/SpecialForm.php
+++ b/SpecialForm.php
@@ -156,8 +156,6 @@
}
private function showForm( $form, $errMsg = null ) {
- global $wgSpecialFormRecaptcha;
-
$out = $this->getOutput();
$request = $this->getRequest();
$user = $this->getUser();
@@ -199,13 +197,6 @@
);
}
- # Anonymous user, use reCAPTCHA
- if ( $user->isAnon() && $wgSpecialFormRecaptcha ) {
- require_once 'recaptchalib.php';
- global $recaptcha_public_key; # same as used by
reCAPTCHA extension
- $out->addHTML( recaptcha_get_html(
$recaptcha_public_key ) );
- }
-
# CAPTCHA enabled?
if ( $this->useCaptcha() ) {
$out->addHTML( $this->getCaptcha() );
@@ -226,28 +217,9 @@
* @param Form $form
*/
private function createArticle( $form ) {
- global $wgSpecialFormRecaptcha;
-
$out = $this->getOutput();
$request = $this->getRequest();
$user = $this->getUser();
-
- # Check reCAPTCHA
- if ( $user->isAnon() && $wgSpecialFormRecaptcha ) {
- require_once 'recaptchalib.php';
- global $recaptcha_private_key; # same as used by
reCAPTCHA extension
- $resp = recaptcha_check_answer(
- $recaptcha_private_key,
- $_SERVER['REMOTE_ADDR'],
- $request->getText( 'recaptcha_challenge_field'
),
- $request->getText( 'recaptcha_response_field' )
- );
-
- if ( !$resp->is_valid ) {
- $this->showForm( $form, $this->msg(
'form-bad-recaptcha' )->text() );
- return;
- }
- }
# Check ordinary CAPTCHA
if ( $this->useCaptcha() &&
!ConfirmEditHooks::getInstance()->passCaptchaFromRequest( $request, $user ) ) {
diff --git a/extension.json b/extension.json
index 437c297..af98792 100644
--- a/extension.json
+++ b/extension.json
@@ -9,9 +9,6 @@
"url": "https://www.mediawiki.org/wiki/Extension:Form",
"descriptionmsg": "form-desc",
"type": "specialpage",
- "config": {
- "SpecialFormRecaptcha": false
- },
"SpecialPages": {
"Form": "SpecialForm"
},
diff --git a/i18n/en.json b/i18n/en.json
index 7cbbc22..5ca2299 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -21,7 +21,6 @@
"form-article-exists": "Page exists",
"form-article-existstext": "The page [[$1]] already exists.",
"form-bad-page-name": "Bad page name",
- "form-bad-recaptcha": "Incorrect values for reCaptcha. Try again.",
"form-bad-page-name-text": "The form data you entered makes a bad page
name, \"$1\".",
"form-required-field-error": "The {{PLURAL:$2|field $1 is|fields $1
are}} required for this form.\nPlease fill {{PLURAL:$2|it|them}} in.",
"form-save-summary": "New page using [[Special:Form/$1|form $1]]",
--
To view, visit https://gerrit.wikimedia.org/r/392741
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If38683947deb116b9edd2599b37c9f41a88c4f6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Form
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits