diff --git a/FancyCaptcha/ApiFancyCaptchaReload.php b/FancyCaptcha/ApiFancyCaptchaReload.php index bdeb2c9b..d53d7baa 100644 --- a/FancyCaptcha/ApiFancyCaptchaReload.php +++ b/FancyCaptcha/ApiFancyCaptchaReload.php @@ -17,24 +17,10 @@ class ApiFancyCaptchaReload extends ApiBase { return true; } - /** - * @deprecated since MediaWiki core 1.25 - */ - public function getDescription() { - return 'Get a new FancyCaptcha.'; - } - public function getAllowedParams() { return []; } - /** - * @deprecated since MediaWiki core 1.25 - */ - public function getExamples() { - return [ 'api.php?action=fancycaptchareload&format=xml' ]; - } - /** * @see ApiBase::getExamplesMessages() */ diff --git a/ReCaptcha/ReCaptcha.class.php b/ReCaptcha/ReCaptcha.class.php index 123f6436..84d7711a 100644 --- a/ReCaptcha/ReCaptcha.class.php +++ b/ReCaptcha/ReCaptcha.class.php @@ -83,30 +83,12 @@ class ReCaptcha extends SimpleCaptcha { public function APIGetAllowedParams( &$module, &$params, $flags ) { if ( $flags && $this->isAPICaptchaModule( $module ) ) { - if ( defined( 'ApiBase::PARAM_HELP_MSG' ) ) { - $params['recaptcha_challenge_field'] = [ - ApiBase::PARAM_HELP_MSG => 'recaptcha-apihelp-param-recaptcha_challenge_field', - ]; - $params['recaptcha_response_field'] = [ - ApiBase::PARAM_HELP_MSG => 'recaptcha-apihelp-param-recaptcha_response_field', - ]; - } else { - // @todo: Remove this branch when support for MediaWiki < 1.25 is dropped - $params['recaptcha_challenge_field'] = null; - $params['recaptcha_response_field'] = null; - } - } - - return true; - } - - /** - * @deprecated since MediaWiki 1.25 - */ - public function APIGetParamDescription( &$module, &$desc ) { - if ( $this->isAPICaptchaModule( $module ) ) { - $desc['recaptcha_challenge_field'] = 'Field from the ReCaptcha widget'; - $desc['recaptcha_response_field'] = 'Field from the ReCaptcha widget'; + $params['recaptcha_challenge_field'] = [ + ApiBase::PARAM_HELP_MSG => 'recaptcha-apihelp-param-recaptcha_challenge_field', + ]; + $params['recaptcha_response_field'] = [ + ApiBase::PARAM_HELP_MSG => 'recaptcha-apihelp-param-recaptcha_response_field', + ]; } return true; diff --git a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php index 6c94795b..90fc9a68 100644 --- a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php +++ b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php @@ -154,25 +154,9 @@ HTML; public function APIGetAllowedParams( &$module, &$params, $flags ) { if ( $flags && $this->isAPICaptchaModule( $module ) ) { - if ( defined( 'ApiBase::PARAM_HELP_MSG' ) ) { - $params['g-recaptcha-response'] = [ - ApiBase::PARAM_HELP_MSG => 'renocaptcha-apihelp-param-g-recaptcha-response', - ]; - } else { - // @todo: Remove this branch when support for MediaWiki < 1.25 is dropped - $params['g-recaptcha-response'] = null; - } - } - - return true; - } - - /** - * @deprecated since MediaWiki 1.25 - */ - public function APIGetParamDescription( &$module, &$desc ) { - if ( $this->isAPICaptchaModule( $module ) ) { - $desc['g-recaptcha-response'] = 'Field from the ReCaptcha widget'; + $params['g-recaptcha-response'] = [ + ApiBase::PARAM_HELP_MSG => 'renocaptcha-apihelp-param-g-recaptcha-response', + ]; } return true; diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php index 14f217a4..96f7d164 100644 --- a/SimpleCaptcha/Captcha.php +++ b/SimpleCaptcha/Captcha.php @@ -1072,33 +1072,12 @@ class SimpleCaptcha { */ public function APIGetAllowedParams( &$module, &$params, $flags ) { if ( $this->isAPICaptchaModule( $module ) ) { - if ( defined( 'ApiBase::PARAM_HELP_MSG' ) ) { - $params['captchaword'] = [ - ApiBase::PARAM_HELP_MSG => 'captcha-apihelp-param-captchaword', - ]; - $params['captchaid'] = [ - ApiBase::PARAM_HELP_MSG => 'captcha-apihelp-param-captchaid', - ]; - } else { - // @todo: Remove this branch when support for MediaWiki < 1.25 is dropped - $params['captchaword'] = null; - $params['captchaid'] = null; - } - } - - return true; - } - - /** - * @deprecated Since MediaWiki 1.25 - * @param $module ApiBase - * @param $desc array - * @return bool - */ - public function APIGetParamDescription( &$module, &$desc ) { - if ( $this->isAPICaptchaModule( $module ) ) { - $desc['captchaid'] = 'CAPTCHA ID from previous request'; - $desc['captchaword'] = 'Answer to the CAPTCHA'; + $params['captchaword'] = [ + ApiBase::PARAM_HELP_MSG => 'captcha-apihelp-param-captchaword', + ]; + $params['captchaid'] = [ + ApiBase::PARAM_HELP_MSG => 'captcha-apihelp-param-captchaid', + ]; } return true; diff --git a/extension.json b/extension.json index 59372cf0..095f9529 100644 --- a/extension.json +++ b/extension.json @@ -76,7 +76,6 @@ "EditPage::showEditForm:fields": "ConfirmEditHooks::showEditFormFields", "EditFilterMergedContent": "ConfirmEditHooks::confirmEditMerged", "APIGetAllowedParams": "ConfirmEditHooks::APIGetAllowedParams", - "APIGetParamDescription": "ConfirmEditHooks::APIGetParamDescription", "TitleReadWhitelist": "ConfirmEditHooks::onTitleReadWhitelist", "AlternateEditPreview": "ConfirmEditHooks::onAlternateEditPreview" }, diff --git a/includes/ConfirmEditHooks.php b/includes/ConfirmEditHooks.php index 80e25d22..8e445c0a 100644 --- a/includes/ConfirmEditHooks.php +++ b/includes/ConfirmEditHooks.php @@ -128,10 +128,6 @@ class ConfirmEditHooks { return self::getInstance()->APIGetAllowedParams( $module, $params, $flags ); } - public static function APIGetParamDescription( &$module, &$desc ) { - return self::getInstance()->APIGetParamDescription( $module, $desc ); - } - public static function onAuthChangeFormFields( array $requests, array $fieldInfo, array &$formDescriptor, $action ) {