mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-23 15:56:50 +00:00
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
This commit is contained in:
parent
6925a22309
commit
a480d98b3f
|
@ -45,7 +45,7 @@ The reCAPTCHA module was written by Mike Crawford and Ben Maurer.
|
|||
|
||||
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 @@ $wgCaptchaBadLoginExpiration = 5 * 60;
|
|||
* 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
|
||||
|
|
|
@ -487,9 +487,7 @@ class SimpleCaptcha {
|
|||
* @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 @@ class SimpleCaptcha {
|
|||
} 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;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class ConfirmEditHooks {
|
|||
|
||||
/**
|
||||
* 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 @@ class ConfirmEditHooks {
|
|||
*/
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue