Florianschmidtwelzow has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348582 )
Change subject: Don't set CaptchaClass in ConfirmEdit\extension.json ...................................................................... Don't set CaptchaClass in ConfirmEdit\extension.json The CaptchaClass config option is provided by ConfirmEdit, but it is also set in the modules extension.json. Instead of overwriting the value, which makes it dependant to the extension load order, set the SimpleCaptcha after all extensions are processed and the class is not set already (while issuing a log warning). See also: Iaef32efab397e82ff70ddca8ac79c545c5b7d2bb Bug: T152929 Change-Id: I3d140247ed6669ed345574e562dda52d62545110 --- M extension.json M includes/ConfirmEditHooks.php 2 files changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit refs/changes/82/348582/1 diff --git a/extension.json b/extension.json index 61ec7af..8abfd63 100644 --- a/extension.json +++ b/extension.json @@ -93,7 +93,6 @@ "config": { "CaptchaWhitelistIP": false, "Captcha": null, - "CaptchaClass": "SimpleCaptcha", "CaptchaTriggers": { "edit": false, "create": false, diff --git a/includes/ConfirmEditHooks.php b/includes/ConfirmEditHooks.php index a77638b..6b63372 100644 --- a/includes/ConfirmEditHooks.php +++ b/includes/ConfirmEditHooks.php @@ -84,12 +84,15 @@ } /** - * Set up $wgWhitelistRead + * Set up ConfirmEdit with different settings: + * - setup $wgCaptchaTriggers for unit tests + * - Migrate $ceAllowedConfirmedEmail to $wgAllowConfirmedEmail + * - set default $wgCaptchaClass */ public static function confirmEditSetup() { // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix global $wgCaptchaTriggers, $wgWikimediaJenkinsCI, $ceAllowConfirmedEmail, - $wgAllowConfirmedEmail; + $wgAllowConfirmedEmail, $wgCaptchaClass; // @codingStandardsIgnoreEnd // There is no need to run (core) tests with enabled ConfirmEdit - bug T44145 @@ -105,6 +108,12 @@ 'please migrate to $wgAllowConfirmedEmail as a replacement.' ); $wgAllowConfirmedEmail = $ceAllowConfirmedEmail; } + + if ( !isset( $wgCaptchaClass ) ) { + wfDebugLog( 'ConfirmEdit', 'ConfirmEdit was loaded without explicitly setting the ' . + 'CAPTCHA module, setting it automatically to SimpleCaptcha.' ); + $wgCaptchaClass = 'SimpleCaptcha'; + } } /** -- To view, visit https://gerrit.wikimedia.org/r/348582 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d140247ed6669ed345574e562dda52d62545110 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ConfirmEdit Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits