From: Chris Burgess Date: Wed, 24 Aug 2016 01:06:45 +0000 (+1200) Subject: CRM-15928. Improve variable name and docs for remote profile embed functionality. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e8a64b98fa4b43a5935cee57015a45f8e8b761fb;p=civicrm-core.git CRM-15928. Improve variable name and docs for remote profile embed functionality. --- diff --git a/CRM/Admin/Form/Setting/Miscellaneous.php b/CRM/Admin/Form/Setting/Miscellaneous.php index 7252e404c8..6de75f8269 100644 --- a/CRM/Admin/Form/Setting/Miscellaneous.php +++ b/CRM/Admin/Form/Setting/Miscellaneous.php @@ -52,7 +52,7 @@ class CRM_Admin_Form_Setting_Miscellaneous extends CRM_Admin_Form_Setting { 'recentItemsMaxCount' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'recentItemsProviders' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'dedupe_default_limit' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, - 'remote_profile_submissions_allowed' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, + 'remote_profile_submissions' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, ); public $_uploadMaxSize; diff --git a/CRM/Profile/Page/Router.php b/CRM/Profile/Page/Router.php index 8d3ff09abb..6ad1a28e9c 100644 --- a/CRM/Profile/Page/Router.php +++ b/CRM/Profile/Page/Router.php @@ -98,7 +98,7 @@ class CRM_Profile_Page_Router extends CRM_Core_Page { if ($secondArg == 'edit' || $secondArg == 'create') { if ($secondArg == 'edit') { - $allowRemoteSubmit = Civi::settings()->get('remote_profile_submissions_allowed'); + $allowRemoteSubmit = Civi::settings()->get('remote_profile_submissions'); $controller = new CRM_Core_Controller_Simple('CRM_Profile_Form_Edit', ts('Create Profile'), CRM_Core_Action::UPDATE, diff --git a/CRM/UF/Page/Group.php b/CRM/UF/Page/Group.php index 0949bc2f7f..5457d73ba1 100644 --- a/CRM/UF/Page/Group.php +++ b/CRM/UF/Page/Group.php @@ -126,7 +126,7 @@ class CRM_UF_Page_Group extends CRM_Core_Page { 'extra' => 'onclick = "return confirm(\'' . $copyExtra . '\');"', ), ); - $allowRemoteSubmit = Civi::settings()->get('remote_profile_submissions_allowed'); + $allowRemoteSubmit = Civi::settings()->get('remote_profile_submissions'); if ($allowRemoteSubmit) { self::$_actionLinks[CRM_Core_Action::PROFILE] = array( 'name' => ts('HTML Form Snippet'), diff --git a/CRM/Upgrade/Incremental/php/FourSeven.php b/CRM/Upgrade/Incremental/php/FourSeven.php index f609a26eda..8d3f576b50 100644 --- a/CRM/Upgrade/Incremental/php/FourSeven.php +++ b/CRM/Upgrade/Incremental/php/FourSeven.php @@ -99,7 +99,7 @@ class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base $postUpgradeMessage .= '

' . ts('The custom fatal error template setting has been removed.') . '

'; } - if ($rev == '4.7.21') { + if ($rev == '4.7.11') { $postUpgradeMessage .= '

' . ts("WARNING: For increased security, profile submissions embedded in remote sites are no longer allowed to create or edit data by default. If you need to allow users to submit profiles from external sites, you can restore this at Administer > System Settings > Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.) > 'Accept profile submissions from external sites'"); } } diff --git a/settings/Core.setting.php b/settings/Core.setting.php index ac7ead14af..28d897e7e5 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -177,10 +177,10 @@ return array( 'description' => NULL, 'help_text' => NULL, ), - 'remote_profile_submissions_allowed' => array( + 'remote_profile_submissions' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', - 'name' => 'remote_profile_submissions_allowed', + 'name' => 'remote_profile_submissions', 'type' => 'Boolean', 'quick_form_type' => 'YesNo', 'default' => FALSE, diff --git a/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl b/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl index 9c886b12c3..67ce3cd3ec 100644 --- a/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl +++ b/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl @@ -90,9 +90,10 @@

{ts}If enabled, CiviCRM will allow users to submit profiles from external sites. This is disabled by default to limit abuse.{/ts}

- -

{ts}reCAPTCHA Keys{/ts}

+ +

{ts}reCAPTCHA Keys{/ts}

+
{ts 1="https://www.google.com/recaptcha"}reCAPTCHA is a free service that helps prevent automated abuse of your site. To use reCAPTCHA on public-facing CiviCRM forms: sign up at Google's reCaptcha site; enter the provided public and private reCAPTCHA keys here; then enable reCAPTCHA under Advanced Settings in any Profile.{/ts}