[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: Remove pre-1.25 API compatibility code
jenkins-bot has submitted this change and it was merged. Change subject: Remove pre-1.25 API compatibility code .. Remove pre-1.25 API compatibility code Since this extension uses extension.json, it already requires 1.25+ so no need to keep the old code around. Change-Id: I31b96b0939d5321be31889422cfc703c9c6c2baa --- M FancyCaptcha/ApiFancyCaptchaReload.php M ReCaptcha/ReCaptcha.class.php M ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php M SimpleCaptcha/Captcha.php M extension.json M includes/ConfirmEditHooks.php 6 files changed, 15 insertions(+), 89 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/FancyCaptcha/ApiFancyCaptchaReload.php b/FancyCaptcha/ApiFancyCaptchaReload.php index bdeb2c9..d53d7ba 100644 --- a/FancyCaptcha/ApiFancyCaptchaReload.php +++ b/FancyCaptcha/ApiFancyCaptchaReload.php @@ -17,22 +17,8 @@ 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' ]; } /** diff --git a/ReCaptcha/ReCaptcha.class.php b/ReCaptcha/ReCaptcha.class.php index 123f643..84d7711 100644 --- a/ReCaptcha/ReCaptcha.class.php +++ b/ReCaptcha/ReCaptcha.class.php @@ -83,30 +83,12 @@ 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 6c94795..90fc9a6 100644 --- a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php +++ b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php @@ -154,25 +154,9 @@ 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 => 'ren
[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: Remove pre-1.25 API compatibility code
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/311779 Change subject: Remove pre-1.25 API compatibility code .. Remove pre-1.25 API compatibility code Since this extension uses extension.json, it already requires 1.25+ so no need to keep the old code around. Change-Id: I31b96b0939d5321be31889422cfc703c9c6c2baa --- M FancyCaptcha/ApiFancyCaptchaReload.php M ReCaptcha/ReCaptcha.class.php M ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php M SimpleCaptcha/Captcha.php M extension.json M includes/ConfirmEditHooks.php 6 files changed, 15 insertions(+), 89 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit refs/changes/79/311779/1 diff --git a/FancyCaptcha/ApiFancyCaptchaReload.php b/FancyCaptcha/ApiFancyCaptchaReload.php index bdeb2c9..d53d7ba 100644 --- a/FancyCaptcha/ApiFancyCaptchaReload.php +++ b/FancyCaptcha/ApiFancyCaptchaReload.php @@ -17,22 +17,8 @@ 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' ]; } /** diff --git a/ReCaptcha/ReCaptcha.class.php b/ReCaptcha/ReCaptcha.class.php index 123f643..84d7711 100644 --- a/ReCaptcha/ReCaptcha.class.php +++ b/ReCaptcha/ReCaptcha.class.php @@ -83,30 +83,12 @@ 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 6c94795..90fc9a6 100644 --- a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php +++ b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php @@ -154,25 +154,9 @@ 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'] = [ +