ConfirmEditHandler: Remove method_exists checks

Why:

- This is backwards compatibility code that is no longer needed

What:

- Remove unneeded method_exists checks

Depends-On: I3484d66298bc9f49dfbe003a0605e2ac1a092e10
Bug: T20110
Change-Id: Ie4f817f3a76da3c3ea2f03ad99978ce211d3063d
(cherry picked from commit 62de03cb85)
This commit is contained in:
Kosta Harlan 2024-12-12 10:47:22 +01:00 committed by Reedy
parent 03d99312b5
commit dafb902dd8

View file

@ -23,12 +23,6 @@ class ConfirmEditHandler implements EditFilterMergedContentHook {
return true;
}
$simpleCaptcha = Hooks::getInstance();
// FIXME: Remove method_exists checks after I3484d66298bc9f49dfbe003a0605e2ac1a092e10 is merged
if ( !method_exists( $simpleCaptcha, 'shouldForceShowCaptcha' ) ||
!method_exists( $simpleCaptcha, 'isCaptchaSolved' ) ||
!method_exists( $simpleCaptcha, 'editFilterMergedContentHandlerAlreadyInvoked' ) ) {
return true;
}
// In WMF production, AbuseFilter is loaded after ConfirmEdit. That means,
// Extension:ConfirmEdit's EditFilterMergedContent hook has already run, and that hook
// is responsible for deciding whether to show a CAPTCHA via the SimpleCaptcha::confirmEditMerged