mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-25 08:35:46 +00:00
50bc57a200
Instead of misusing the config section of extension.json to declare captcha triggers in the ConfirmEdits CaptchaTriggers config variable, other extensions can now use the CaptchaTriggers attribute for the exact same thing. E.g., to declare a new trigger, the following addition to the own extension.json will register the trigger in ConfirmEdit: "CaptchaTriggers": { "wikiforum": true } This also removes the CaptchaClass config from the main extension.json config section, and automatically sets the SimpleCaptcha module in the getInstance() method of ConfirmEditHooks, which is a pre-requirement for the mediawiki/core change Ieeb26011e42c741041d2c3252238ca0823b99eb4. Bug: T152929 Change-Id: I4c5eaf87657f5dc07787480a2f1a56a1db8c714f
18 lines
493 B
PHP
18 lines
493 B
PHP
<?php
|
|
|
|
/**
|
|
* A class with constants of the CAPTCHA triggers built-in in ConfirmEdit. Other extensions may
|
|
* add more possible triggers, which are not included in this class.
|
|
*/
|
|
abstract class CaptchaTriggers {
|
|
const EDIT = 'edit';
|
|
const CREATE = 'create';
|
|
const SENDEMAIL = 'sendemail';
|
|
const ADD_URL = 'addurl';
|
|
const CREATE_ACCOUNT = 'createaccount';
|
|
const BAD_LOGIN = 'badlogin';
|
|
const BAD_LOGIN_PER_USER = 'badloginperuser';
|
|
|
|
const EXT_REG_ATTRIBUTE_NAME = 'CaptchaTriggers';
|
|
}
|