From 69af8d49dc78e7d4f966b2cc6509e5ea5d4a031d Mon Sep 17 00:00:00 2001 From: John Kingsnorth Date: Fri, 2 Dec 2022 09:15:17 +0000 Subject: [PATCH] dev/core#4020 Remove old recaptcha options --- CRM/Core/Config/MagicMerge.php | 1 - .../Incremental/sql/5.57.alpha1.mysql.tpl | 3 +++ api/v3/examples/Setting/GetFields.ex.php | 24 ------------------- ext/recaptcha/CRM/Utils/ReCAPTCHA.php | 1 - ext/recaptcha/settings/recaptcha.setting.php | 24 ------------------- .../templates/CRM/common/ReCAPTCHA.tpl | 2 -- 6 files changed, 3 insertions(+), 52 deletions(-) diff --git a/CRM/Core/Config/MagicMerge.php b/CRM/Core/Config/MagicMerge.php index ab9ef82867..e88d6d24df 100644 --- a/CRM/Core/Config/MagicMerge.php +++ b/CRM/Core/Config/MagicMerge.php @@ -159,7 +159,6 @@ class CRM_Core_Config_MagicMerge { 'moneyformat' => ['setting'], 'moneyvalueformat' => ['setting'], 'provinceLimit' => ['setting'], - 'recaptchaOptions' => ['setting'], 'recaptchaPublicKey' => ['setting'], 'recaptchaPrivateKey' => ['setting'], 'forceRecaptcha' => ['setting'], diff --git a/CRM/Upgrade/Incremental/sql/5.57.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.57.alpha1.mysql.tpl index c368b8c947..a9a5f1f00a 100644 --- a/CRM/Upgrade/Incremental/sql/5.57.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.57.alpha1.mysql.tpl @@ -1 +1,4 @@ {* file to handle db changes in 5.57.alpha1 during upgrade *} + +-- Remove unsupported recaptcha options wherever present +DELETE FROM civicrm_setting WHERE name = 'recaptchaOptions'; diff --git a/api/v3/examples/Setting/GetFields.ex.php b/api/v3/examples/Setting/GetFields.ex.php index ee1e78de0e..f6b3978267 100644 --- a/api/v3/examples/Setting/GetFields.ex.php +++ b/api/v3/examples/Setting/GetFields.ex.php @@ -3349,30 +3349,6 @@ function setting_getfields_expectedresult() { ], ], ], - 'recaptchaOptions' => [ - 'group_name' => 'CiviCRM Preferences', - 'group' => 'core', - 'name' => 'recaptchaOptions', - 'type' => 'String', - 'quick_form_type' => 'Element', - 'html_attributes' => [ - 'size' => 64, - 'maxlength' => 64, - ], - 'html_type' => 'text', - 'default' => '', - 'add' => '4.3', - 'title' => 'reCAPTCHA Options', - 'is_domain' => 1, - 'is_contact' => 0, - 'description' => 'You can specify the reCAPTCHA theme options as comma separated data.(eg: theme:\'blackglass\', lang : \'fr\' ). Check the available options at Customizing the Look and Feel of reCAPTCHA.', - 'help_text' => '', - 'settings_pages' => [ - 'recaptcha' => [ - 'weight' => 10, - ], - ], - ], 'credit_notes_prefix' => [ 'group_name' => 'Contribute Preferences', 'group' => 'contribute', diff --git a/ext/recaptcha/CRM/Utils/ReCAPTCHA.php b/ext/recaptcha/CRM/Utils/ReCAPTCHA.php index 4381a6092c..d26a6aaba4 100644 --- a/ext/recaptcha/CRM/Utils/ReCAPTCHA.php +++ b/ext/recaptcha/CRM/Utils/ReCAPTCHA.php @@ -76,7 +76,6 @@ class CRM_Utils_ReCAPTCHA { $html = recaptcha_get_html(\Civi::settings()->get('recaptchaPublicKey'), $error, $useHTTPS); $form->assign('recaptchaHTML', $html); - $form->assign('recaptchaOptions', \Civi::settings()->get('recaptchaOptions')); $form->add( 'text', 'g-recaptcha-response', diff --git a/ext/recaptcha/settings/recaptcha.setting.php b/ext/recaptcha/settings/recaptcha.setting.php index 32768e35d3..cafccc30ee 100644 --- a/ext/recaptcha/settings/recaptcha.setting.php +++ b/ext/recaptcha/settings/recaptcha.setting.php @@ -83,28 +83,4 @@ return [ ], ], ], - 'recaptchaOptions' => [ - 'group_name' => 'CiviCRM Preferences', - 'group' => 'core', - 'name' => 'recaptchaOptions', - 'type' => 'String', - 'quick_form_type' => 'Element', - 'html_attributes' => [ - 'size' => 64, - 'maxlength' => 64, - ], - 'html_type' => 'text', - 'default' => NULL, - 'add' => '4.3', - 'title' => E::ts('reCAPTCHA Options'), - 'is_domain' => 1, - 'is_contact' => 0, - 'description' => E::ts('You can specify the reCAPTCHA theme options as comma separated data.(eg: theme:\'blackglass\', lang : \'fr\' ). Check the available options at Customizing the Look and Feel of reCAPTCHA.'), - 'help_text' => NULL, - 'settings_pages' => [ - 'recaptcha' => [ - 'weight' => 10, - ], - ], - ], ]; diff --git a/ext/recaptcha/templates/CRM/common/ReCAPTCHA.tpl b/ext/recaptcha/templates/CRM/common/ReCAPTCHA.tpl index 38474236cd..bf2d448bbd 100644 --- a/ext/recaptcha/templates/CRM/common/ReCAPTCHA.tpl +++ b/ext/recaptcha/templates/CRM/common/ReCAPTCHA.tpl @@ -18,8 +18,6 @@ {literal}