Nischayn22 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/66382
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(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticSignup
refs/changes/82/66382/1
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 e175f01..f51f2c3 100644
--- a/ROADMAP
+++ b/ROADMAP
@@ -6,5 +6,4 @@
== Version 0.4 ==
-* 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 39775a9..b26246c 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: newchange
Gerrit-Change-Id: I2578b83f120320d9ceef9233e451caf0dca1a411
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticSignup
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits