From: Kartik Kathuria Date: Thu, 29 Apr 2021 22:14:21 +0000 (+0530) Subject: Changes made in ref to master X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f8b40a39c17fa804be20341a10912812267ab909;p=civicrm-core.git Changes made in ref to master --- diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index 68a99aec74..738e1f1fca 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -290,7 +290,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu $this->buildComponentForm($this->_id, $this); } - if (count($this->_paymentProcessors) >= 1 && !$this->get_template_vars("isCaptcha") && $this->hasToAddForcefully()) { + if (count($this->_paymentProcessors) >= 1 && !$this->get_template_vars("isCaptcha") && \Civi::settings()->get('forceRecaptcha')) { if (!$this->_userID) { CRM_Utils_ReCAPTCHA::enableCaptchaOnForm($this); } diff --git a/ext/recaptcha/CRM/Utils/ReCAPTCHA.php b/ext/recaptcha/CRM/Utils/ReCAPTCHA.php index db2664e56b..c5e8417818 100644 --- a/ext/recaptcha/CRM/Utils/ReCAPTCHA.php +++ b/ext/recaptcha/CRM/Utils/ReCAPTCHA.php @@ -55,13 +55,6 @@ class CRM_Utils_ReCAPTCHA { return (bool) \Civi::settings()->get('recaptchaPublicKey'); } - /** - * Check if reCaptcha has to be added on form forcefully. - */ - public static function hasToAddForcefully() { - return (bool) \Civi::settings()->get('forceRecaptcha'); - } - /** * Add element to form. *