Yaron Koren has submitted this change and it was merged.

Change subject: Added support for Captcha
......................................................................


Added support for Captcha

Change-Id: I2578b83f120320d9ceef9233e451caf0dca1a411
---
M INSTALL
M RELEASE-NOTES
M ROADMAP
M SemanticSignup.settings.php
M includes/SES_SignupFields.php
5 files changed, 13 insertions(+), 7 deletions(-)

Approvals:
  Yaron Koren: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/INSTALL b/INSTALL
index 8be2f7c..40de149 100644
--- a/INSTALL
+++ b/INSTALL
@@ -66,3 +66,9 @@
 Default: $egSemanticSignupSettings['botName'] = '';
 
 Example: $egSemanticSignupSettings['botName'] = 'Admin';
+
+=== Enable Captcha ===
+
+If captcha should be enabled (requires ConfirmEdit extension to be installed) ?
+
+Default: $egSemanticSignupSettings['useCaptcha'] = true;
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index fe925df..f29f6c0 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -7,7 +7,7 @@
 === Version 0.4 ===
 2011-xx-xx
 
-* 
+* Added compatibility with ConfirmEdit
 
 === Version 0.3 ===
 2011-08-15
diff --git a/ROADMAP b/ROADMAP
index 7f16dae..cb79efb 100644
--- a/ROADMAP
+++ b/ROADMAP
@@ -5,7 +5,3 @@
 
 
 == Version 0.4 ==
-
-* Fix compatibility with latest SemanticForms
-* Fix compatibility with Confirm Edit and other captcha extensions.
-* Fix loading of obsolete JavaScript and CSS files.
diff --git a/SemanticSignup.settings.php b/SemanticSignup.settings.php
index 33306c2..21f9060 100644
--- a/SemanticSignup.settings.php
+++ b/SemanticSignup.settings.php
@@ -22,6 +22,7 @@
                        'requireName' => false,
                        'formName' => '',
                        'botName' => '',
+                       'useCaptcha' => true,
                );
        }
 
diff --git a/includes/SES_SignupFields.php b/includes/SES_SignupFields.php
index b15a5b4..e2825ac 100644
--- a/includes/SES_SignupFields.php
+++ b/includes/SES_SignupFields.php
@@ -162,8 +162,6 @@
 
                $template = new CreateUserFieldsTemplate();
 
-               $template->set( 'header', '' );
-
                global $wgEnableEmail, $wgAllowRealName, $wgEmailConfirmToEdit, 
$wgAuth, $wgUser;
 
                $template->set( 'link', '' ); // TODO
@@ -185,6 +183,11 @@
                $type = 'signup';
                $wgAuth->modifyUITemplate( $template, $type );
 
+               if( SemanticSignupSettings::get( 'useCaptcha' ) && isset( 
$GLOBALS['wgCaptchaClass'] ) ) {
+                       $captchaObject = new $GLOBALS['wgCaptchaClass'];
+                       $captchaObject->injectUserCreate( $template );
+               }
+
                ob_start();
                $template->execute();
                $text = ob_get_clean();

-- 
To view, visit https://gerrit.wikimedia.org/r/66382
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2578b83f120320d9ceef9233e451caf0dca1a411
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SemanticSignup
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to