Krinkle has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/350967 )
Change subject: Fixup use of $ceAllowConfirmedEmail
......................................................................
Fixup use of $ceAllowConfirmedEmail
Follows-up 37f2dcf. confirmEditSetup() maps it to the new name so any use of it
within
the extension can safely be replaced.
* Fix Catpcha.php.
* Update README.md.
Change-Id: I4b23954eba2d7d3e86e4f60d8189e263b864fbd3
---
M README.md
M SimpleCaptcha/Captcha.php
M includes/ConfirmEditHooks.php
3 files changed, 7 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit
refs/changes/67/350967/1
diff --git a/README.md b/README.md
index 2d2de44..09d83c8 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,7 @@
Additional maintenance work was done by Yaron Koren.
-### Configuations Comments
+### Configuration comments
```php
/**
* List of IP ranges to allow to skip the captcha, similar to the group
setting:
@@ -128,7 +128,7 @@
* Allow users who have confirmed their email addresses to post
* URL links without being harassed by the captcha.
*/
-$ceAllowConfirmedEmail = false;
+$wgAllowConfirmedEmail = false;
/**
* Number of bad login attempts before triggering the captcha. 0 means the
diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php
index c9489b0..aaf9db2 100644
--- a/SimpleCaptcha/Captcha.php
+++ b/SimpleCaptcha/Captcha.php
@@ -487,9 +487,7 @@
* @return bool true if the captcha should run
*/
function shouldCheck( WikiPage $page, $content, $section, $context,
$oldtext = null ) {
- // @codingStandardsIgnoreStart
- global $ceAllowConfirmedEmail;
- // @codingStandardsIgnoreEnd
+ global $wgAllowConfirmedEmail;
if ( !$context instanceof IContextSource ) {
$context = RequestContext::getMain();
@@ -505,7 +503,7 @@
} elseif ( $this->isIPWhitelisted() ) {
wfDebug( "ConfirmEdit: user IP is whitelisted" );
return false;
- } elseif ( $ceAllowConfirmedEmail && $user->isEmailConfirmed()
) {
+ } elseif ( $wgAllowConfirmedEmail && $user->isEmailConfirmed()
) {
wfDebug( "ConfirmEdit: user has confirmed mail,
skipping captcha\n" );
return false;
}
diff --git a/includes/ConfirmEditHooks.php b/includes/ConfirmEditHooks.php
index a77638b..94ec9bd 100644
--- a/includes/ConfirmEditHooks.php
+++ b/includes/ConfirmEditHooks.php
@@ -28,7 +28,7 @@
/**
* PageContentSaveComplete hook handler.
- * Clear IP whitelist cache on page saves for
[[MediaWiki:captcha-ip-whitelist]].
+ * Clear IP whitelist cache on page saves for
[[MediaWiki:Captcha-ip-whitelist]].
*
* @param WikiPage $wikiPage
* @param User $user
@@ -88,8 +88,8 @@
*/
public static function confirmEditSetup() {
// @codingStandardsIgnoreStart
MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
- global $wgCaptchaTriggers, $wgWikimediaJenkinsCI,
$ceAllowConfirmedEmail,
- $wgAllowConfirmedEmail;
+ global $wgCaptchaTriggers, $wgAllowConfirmedEmail,
+ $wgWikimediaJenkinsCI, $ceAllowConfirmedEmail;
// @codingStandardsIgnoreEnd
// There is no need to run (core) tests with enabled
ConfirmEdit - bug T44145
--
To view, visit https://gerrit.wikimedia.org/r/350967
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b23954eba2d7d3e86e4f60d8189e263b864fbd3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits