From dafb902dd86e172fd102c67eb381ffcdaf5c8428 Mon Sep 17 00:00:00 2001 From: Kosta Harlan Date: Thu, 12 Dec 2024 10:47:22 +0100 Subject: [PATCH] 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 62de03cb8500a6fdef69b1a2cc0845705341e6ce) --- includes/Hooks/Handlers/ConfirmEditHandler.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/includes/Hooks/Handlers/ConfirmEditHandler.php b/includes/Hooks/Handlers/ConfirmEditHandler.php index d6bed2be0..dab7b29a7 100644 --- a/includes/Hooks/Handlers/ConfirmEditHandler.php +++ b/includes/Hooks/Handlers/ConfirmEditHandler.php @@ -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