CRM-15928. Improve variable name and docs for remote profile embed functionality.
authorChris Burgess <chris@giantrobot.co.nz>
Wed, 24 Aug 2016 01:06:45 +0000 (13:06 +1200)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 25 Aug 2016 06:49:11 +0000 (16:49 +1000)
CRM/Admin/Form/Setting/Miscellaneous.php
CRM/Profile/Page/Router.php
CRM/UF/Page/Group.php
CRM/Upgrade/Incremental/php/FourSeven.php
settings/Core.setting.php
templates/CRM/Admin/Form/Setting/Miscellaneous.tpl

index 7252e404c8197e478fb8fbcd3db65ec450b45db2..6de75f82695078c8229bbcce8f35ffdee6926e5c 100644 (file)
@@ -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;
index 8d3ff09abba317a01230313803aeaee8b3958d38..6ad1a28e9c779b43686db5b7453b2c6e54c88863 100644 (file)
@@ -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,
index 0949bc2f7fd4be4a800be7e989050269690f09d0..5457d73ba1e5422ce3fb9196436ba60c832c5536 100644 (file)
@@ -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'),
index f609a26edadcf9d984b7e652fa57c60e1ac88a22..8d3f576b503f0c862d57e7b1babbd699044d0757 100644 (file)
@@ -99,7 +99,7 @@ class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base
 
       $postUpgradeMessage .= '<p>' . ts('The custom fatal error template setting has been removed.') . '</p>';
     }
-    if ($rev == '4.7.21') {
+    if ($rev == '4.7.11') {
       $postUpgradeMessage .= '<br /><br />' . 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'");
     }
   }
index ac7ead14af9909d5238ebc4b044ed56131fe1d96..28d897e7e5990585821b10cf9e6ce9f6bf51a9de 100644 (file)
@@ -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,
index 9c886b12c3293b48463ec846f6c11d12d3df0a43..67ce3cd3ec56ff0d8e454d6517834e8160a6be47 100644 (file)
             <p class="description">{ts}If enabled, CiviCRM will allow users to submit profiles from external sites. This is disabled by default to limit abuse.{/ts}</p>
           </td>
         </tr>
-
     </table>
-<h3>{ts}reCAPTCHA Keys{/ts}</h3>
+
+    <h3>{ts}reCAPTCHA Keys{/ts}</h3>
+
     <div class="description">
         {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 <a href="%1" "target=_blank">Google's reCaptcha site</a>; enter the provided public and private reCAPTCHA keys here; then enable reCAPTCHA under Advanced Settings in any Profile.{/ts}
     </div>