Settings - Remove special cases for `prefetch` and `config_only`
authorTim Otten <totten@civicrm.org>
Sat, 12 Sep 2015 07:15:21 +0000 (00:15 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 17 Sep 2015 22:49:30 +0000 (15:49 -0700)
CRM/Core/BAO/Setting.php
settings/Core.setting.php
settings/Developer.setting.php
settings/Localization.setting.php
settings/Mailing.setting.php
settings/Map.setting.php
settings/Search.setting.php
tests/phpunit/api/v3/SettingTest.php

index 85a45d71e697bb0d631708a63ffceef3218344a9..3d80bd02046f049b1df8a561134ad72ba13e43d2 100644 (file)
@@ -274,29 +274,14 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
       $config = CRM_Core_Config::singleton($reloadConfig, $reloadConfig);
       $result[$domainID] = array();
       foreach ($fieldsToGet as $name => $value) {
-        if (!empty($fields['values'][$name]['prefetch'])) {
-          if (isset($params['filters']) && isset($params['filters']['prefetch'])
-            && $params['filters']['prefetch'] == 0
-          ) {
-            // we are filtering out the prefetches from the return array
-            // so we will skip
-            continue;
-          }
-          $configKey = CRM_Utils_Array::value('config_key', $fields['values'][$name], $name);
-          if (isset($config->$configKey)) {
-            $setting = $config->$configKey;
-          }
-        }
-        else {
-          $setting = CRM_Core_BAO_Setting::getItem(
-            $fields['values'][$name]['group_name'],
-            $name,
-            CRM_Utils_Array::value('component_id', $params),
-            NULL,
-            CRM_Utils_Array::value('contact_id', $params),
-            $domainID
-          );
-        }
+        $setting = CRM_Core_BAO_Setting::getItem(
+          $fields['values'][$name]['group_name'],
+          $name,
+          CRM_Utils_Array::value('component_id', $params),
+          NULL,
+          CRM_Utils_Array::value('contact_id', $params),
+          $domainID
+        );
         if (!is_null($setting)) {
           // we won't return if not set - helps in return all scenario - otherwise we can't indentify the missing ones
           // e.g for revert of fill actions
@@ -430,8 +415,6 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
    * Store multiple items in the setting table. Note that this will also store config keys
    * the storage is determined by the metdata and is affected by
    *  'name' setting's name
-   *  'prefetch' = store in config
-   *  'config_only' = don't store in settings
    *  'config_key' = the config key is different to the settings key - e.g. debug where there was a conflict
    *  'legacy_key' = rename from config or setting with this name
    *
@@ -470,15 +453,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
       $result[$domainID] = array();
       $realSettingsToSet = array(); // need to separate config_backend stuff
       foreach ($fieldsToSet as $name => $value) {
-        if (empty($fields['values'][$name]['config_only'])) {
-          $realSettingsToSet[$name] = $value;
-        }
-        if (!empty($fields['values'][$name]['prefetch'])) {
-          if (!empty($fields['values'][$name]['config_key'])) {
-            $name = $fields['values'][$name]['config_key'];
-          }
-          $config_keys[$name] = $value;
-        }
+        $realSettingsToSet[$name] = $value;
         $result[$domainID][$name] = $value;
       }
       $manager->getBagByDomain($domainID)->add($realSettingsToSet);
@@ -688,21 +663,17 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
     }
     $spec = self::getSettingSpecification(NULL, array('name' => $name), $domainID);
     $configKey = CRM_Utils_Array::value('config_key', $spec[$name], CRM_Utils_Array::value('legacy_key', $spec[$name], $name));
-    //if the key is set to config_only we don't need to do anything
-    if (empty($spec[$name]['config_only'])) {
-      if (!empty($values[$configKey])) {
-        civicrm_api('setting', 'create', array('version' => 3, $name => $values[$configKey], 'domain_id' => $domainID));
-      }
-      else {
-        civicrm_api('setting', 'fill', array('version' => 3, 'name' => $name, 'domain_id' => $domainID));
-      }
+    if (!empty($values[$configKey])) {
+      civicrm_api('setting', 'create', array('version' => 3, $name => $values[$configKey], 'domain_id' => $domainID));
+    }
+    else {
+      civicrm_api('setting', 'fill', array('version' => 3, 'name' => $name, 'domain_id' => $domainID));
+    }
 
-      if (empty($spec[$name]['prefetch']) && !empty($values[$configKey])) {
-        unset($values[$configKey]);
-        $domain->config_backend = serialize($values);
-        $domain->save();
-        unset($config->$configKey);
-      }
+    if (!empty($values[$configKey])) {
+      unset($values[$configKey]);
+      $domain->config_backend = serialize($values);
+      $domain->save();
     }
   }
 
index 6cbf8e2b351be989cf5949e8e435029652becd1e..6b97c170a4f772658d94c1b25bb32eacd3a5c688 100644 (file)
@@ -285,7 +285,6 @@ return array(
     'group' => 'core',
     'name' => 'max_attachments',
     'legacy_key' => 'maxAttachments',
-    'prefetch' => 0,
     'type' => 'Integer',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
@@ -305,8 +304,6 @@ return array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',
     'name' => 'maxFileSize',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Integer',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
@@ -412,8 +409,6 @@ return array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',
     'name' => 'doNotAttachPDFReceipt',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config object. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Boolean',
     'quick_form_type' => 'YesNo',
     'default' => 1,
@@ -428,8 +423,6 @@ return array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',
     'name' => 'wkhtmltopdfPath',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_attributes' => array(
@@ -449,8 +442,6 @@ return array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',
     'name' => 'recaptchaOptions',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_attributes' => array(
@@ -470,8 +461,6 @@ return array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',
     'name' => 'recaptchaPublicKey',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_attributes' => array(
@@ -491,8 +480,6 @@ return array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',
     'name' => 'recaptchaPrivateKey',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_attributes' => array(
@@ -512,8 +499,6 @@ return array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',
     'name' => 'dashboardCacheTimeout',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Integer',
     'quick_form_type' => 'Element',
     'html_attributes' => array(
@@ -552,7 +537,6 @@ return array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',
     'name' => 'blogUrl',
-    'prefetch' => 0,
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_attributes' => array(
@@ -572,7 +556,6 @@ return array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',
     'name' => 'communityMessagesUrl',
-    'prefetch' => 0,
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_attributes' => array(
@@ -642,8 +625,6 @@ return array(
     'type' => 'String',
     'html_type' => 'text',
     'quick_form_type' => 'Element',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'default' => '',
     'add' => '4.3',
     'title' => 'WordPress Base Page',
@@ -656,8 +637,6 @@ return array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',
     'name' => 'secondDegRelPermissions',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Boolean',
     'quick_form_type' => 'YesNo',
     'default' => 0,
@@ -711,8 +690,6 @@ return array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',
     'name' => 'empoweredBy',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Boolean',
     'quick_form_type' => 'YesNo',
     'default' => 1,
@@ -725,7 +702,6 @@ return array(
   ),
   'logging' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -769,8 +745,6 @@ return array(
     'type' => 'String',
     'html_type' => 'text',
     'quick_form_type' => 'Element',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'default' => '',
     'add' => '4.6',
     'title' => 'WordPress Path to wp-load.php',
index 77845e3e489b6428b7dff3ed08e362a45bb45265..f94312eff1735926bf12871e685beb9490bb0dc1 100644 (file)
@@ -49,7 +49,6 @@ return array(
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => "Set this value to Yes if you want CiviCRM error/debugging messages to appear in the Drupal error logs",
-    'prefetch' => 1,
     'help_text' => "Set this value to Yes if you want CiviCRM error/debugging messages the appear in your CMS' error log. In the case of Drupal, this will cause all CiviCRM error messages to appear in the watchdog (assuming you have Drupal's watchdog enabled)",
   ),
   'debug_enabled' => array(
@@ -65,7 +64,6 @@ return array(
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => "Set this value to Yes if you want to use one of CiviCRM's debugging tools. This feature should NOT be enabled for production sites",
-    'prefetch' => 1,
     'help_text' => 'Do not turn this on on production sites',
   ),
   'backtrace' => array(
@@ -80,7 +78,6 @@ return array(
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => "Set this value to Yes if you want to display a backtrace listing when a fatal error is encountered. This feature should NOT be enabled for production sites",
-    'prefetch' => 1,
   ),
   'fatalErrorHandler' => array(
     'group_name' => 'Developer Preferences',
@@ -95,6 +92,5 @@ return array(
     'is_domain' => 1,
     'is_contact' => 0,
     'description' => "Enter the path and class for a custom PHP error-handling function if you want to override built-in CiviCRM error handling for your site.",
-    'prefetch' => 1,
   ),
 );
index 326969b7649132b81049fa6796f4934989c4cffc..f8aca262828bd59ae527cc8e0fb9caed4f038d7b 100644 (file)
@@ -39,7 +39,6 @@
 return array(
   'customTranslateFunction' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -61,8 +60,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'monetaryThousandSeparator',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
@@ -81,8 +78,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'monetaryDecimalPoint',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
@@ -101,8 +96,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'moneyformat',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
@@ -118,8 +111,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'moneyvalueformat',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
@@ -135,8 +126,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'defaultCurrency',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Select',
     'html_type' => 'Select',
@@ -158,8 +147,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'defaultContactCountry',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Select',
     'html_type' => 'Select',
@@ -179,7 +166,6 @@ return array(
   ),
   'defaultContactStateProvince' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -201,8 +187,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'countryLimit',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Array',
     'quick_form_type' => 'Select',
     'html_type' => 'Select',
@@ -225,8 +209,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'provinceLimit',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Array',
     'quick_form_type' => 'Select',
     'html_type' => 'Select',
@@ -249,8 +231,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'inheritLocale',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Boolean',
     'quick_form_type' => 'YesNo',
     'default' => '0',
@@ -265,8 +245,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'dateformatDatetime',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
@@ -282,8 +260,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'dateformatFull',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
@@ -299,8 +275,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'dateformatPartial',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
@@ -314,7 +288,6 @@ return array(
   ),
   'dateformatTime' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -334,7 +307,6 @@ return array(
   ),
   'dateformatYear' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -354,7 +326,6 @@ return array(
   ),
   'dateInputFormat' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -373,7 +344,6 @@ return array(
   ),
   'fieldSeparator' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -393,7 +363,6 @@ return array(
   ),
   'fiscalYearStart' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -433,8 +402,6 @@ return array(
     'group_name' => 'Localization Preferences',
     'group' => 'localization',
     'name' => 'lcMessages',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'String',
     'quick_form_type' => 'Select',
     'html_type' => 'Select',
@@ -457,7 +424,6 @@ return array(
   ),
   'legacyEncoding' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -477,7 +443,6 @@ return array(
   ),
   'timeInputFormat' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
index 4e999a22937b2bcff9a4793a9847a4806ce16408..b940aaea371f189eaeb1d37c2b9c1aae0291ec2b 100644 (file)
@@ -224,7 +224,6 @@ return array(
     'is_contact' => 0,
     'description' => 'Throttle email delivery by setting the maximum number of emails sent during each CiviMail run (0 = unlimited).',
     'help_text' => NULL,
-    'prefetch' => 1,
   ),
   'mailerJobSize' => array(
     'group_name' => 'Mailing Preferences',
@@ -244,7 +243,6 @@ return array(
     'is_contact' => 0,
     'description' => 'If you want to utilize multi-threading enter the size you want your sub jobs to be split into. Recommended values are between 1,000 and 10,000. Use a lower value if your server has multiple cron jobs running simultaneously, but do not use values smaller than 1,000. Enter "0" to disable multi-threading and process mail as one single job - batch limits still apply.',
     'help_text' => NULL,
-    'prefetch' => 1,
   ),
   'mailerJobsMax' => array(
     'group_name' => 'Mailing Preferences',
@@ -264,7 +262,6 @@ return array(
     'is_contact' => 0,
     'description' => 'The maximum number of mailer delivery jobs executing simultaneously (0 = allow as many processes to execute as started by cron)',
     'help_text' => NULL,
-    'prefetch' => 1,
   ),
   'mailThrottleTime' => array(
     'group_name' => 'Mailing Preferences',
@@ -284,7 +281,6 @@ return array(
     'is_contact' => 0,
     'description' => 'The time to sleep in between each e-mail in micro seconds. Setting this above 0 allows you to control the rate at which e-mail messages are sent to the mail server, avoiding filling up the mail queue very quickly. Set to 0 to disable.',
     'help_text' => NULL,
-    'prefetch' => 1,
   ),
   'verpSeparator' => array(
     'group_name' => 'Mailing Preferences',
@@ -304,6 +300,5 @@ return array(
     'is_contact' => 0,
     'description' => 'Separator character used when CiviMail generates VERP (variable envelope return path) Mail-From addresses.',
     'help_text' => NULL,
-    'prefetch' => 1,
   ),
 );
index 21dc6c51db92e5a93514e4a3209ce7305a83b75f..3f1a1003af58c17906355dd84f2796eb5428333b 100644 (file)
@@ -36,7 +36,6 @@
 return array(
   'geoAPIKey' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -56,7 +55,6 @@ return array(
   ),
   'geoProvider' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -78,7 +76,6 @@ return array(
   ),
   'mapAPIKey' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
@@ -98,7 +95,6 @@ return array(
   ),
   'mapProvider' => array(
     'add' => '4.7',
-    'prefetch' => 1,
     'help_text' => NULL,
     'is_domain' => 1,
     'is_contact' => 0,
index b83d6330d92bbeb936c0c45c83b426c15643c6b0..90faa869ee70d9d858429322c23c49e5246f12a1 100644 (file)
@@ -40,7 +40,6 @@ return array(
     'group_name' => 'Search Preferences',
     'group' => 'Search Preferences',
     'name' => 'search_autocomplete_count',
-    'prefetch' => 0,
     'type' => 'Integer',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
@@ -60,7 +59,6 @@ return array(
     'group_name' => 'Search Preferences',
     'group' => 'Search Preferences',
     'name' => 'enable_innodb_fts',
-    'prefetch' => 0,
     'type' => 'Boolean',
     'quick_form_type' => 'YesNo',
     'default' => 0,
@@ -78,7 +76,6 @@ return array(
     'group_name' => 'Search Preferences',
     'group' => 'Search Preferences',
     'name' => 'fts_query_mode',
-    'prefetch' => 0,
     'type' => 'String',
     'quick_form_type' => 'Element',
     'html_attributes' => array(
@@ -98,8 +95,6 @@ return array(
     'group_name' => 'Search Preferences',
     'group' => 'Search Preferences',
     'name' => 'includeOrderByClause',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Boolean',
     'quick_form_type' => 'YesNo',
     'default' => 1,
@@ -114,8 +109,6 @@ return array(
     'group_name' => 'Search Preferences',
     'group' => 'Search Preferences',
     'name' => 'includeWildCardInName',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Boolean',
     'quick_form_type' => 'YesNo',
     'default' => 1,
@@ -130,8 +123,6 @@ return array(
     'group_name' => 'Search Preferences',
     'group' => 'Search Preferences',
     'name' => 'includeEmailInName',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Boolean',
     'quick_form_type' => 'YesNo',
     'default' => 1,
@@ -146,8 +137,6 @@ return array(
     'group_name' => 'Search Preferences',
     'group' => 'Search Preferences',
     'name' => 'includeNickNameInName',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Boolean',
     'quick_form_type' => 'YesNo',
     'default' => 0,
@@ -162,8 +151,6 @@ return array(
     'group_name' => 'Search Preferences',
     'group' => 'Search Preferences',
     'name' => 'includeAlphabeticalPager',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Boolean',
     'quick_form_type' => 'YesNo',
     'default' => 1,
@@ -178,8 +165,6 @@ return array(
     'group_name' => 'Search Preferences',
     'group' => 'Search Preferences',
     'name' => 'smartGroupCacheTimeout',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Integer',
     'quick_form_type' => 'Element',
     'html_type' => 'text',
@@ -195,8 +180,6 @@ return array(
     'group_name' => 'Search Preferences',
     'group' => 'Search Preferences',
     'name' => 'defaultSearchProfileID',
-    'prefetch' => 1,
-    // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
     'type' => 'Integer',
     'quick_form_type' => 'Select',
     'html_type' => 'Select',
index 7b5dae352fd0811e3994127a3e5dbf6260209d9c..c0c56c20846017c4c510be4f75771af3f6fd7ff9 100644 (file)
@@ -134,16 +134,6 @@ class api_v3_SettingTest extends CiviUnitTestCase {
     $this->assertArrayHasKey('domain_group_id', $result['values']);
   }
 
-  /**
-   * Test that getfields will filter on another field (prefetch)
-   */
-  public function testGetFieldsPrefetchFilters() {
-    $params = array('filters' => array('prefetch' => 1));
-    $result = $this->callAPISuccess('setting', 'getfields', $params);
-    $this->assertArrayNotHasKey('disable_mandatory_tokens_check', $result['values']);
-    $this->assertArrayHasKey('monetaryDecimalPoint', $result['values']);
-  }
-
   /**
    * Ensure that on_change callbacks fire.
    *