From dc53734e221848e1adbf0a79040ee18f35e4edce Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 20 Jan 2016 15:49:05 -0800 Subject: [PATCH] CRM-17830 - Setting Form - Remove redundant default check Default values should already be merged within SettingsBag (which sits under-the-hood, beneath Setting::getItem and Setting API). Don't see why we need to explicitly check default in this form. --- CRM/Admin/Form/Setting.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/CRM/Admin/Form/Setting.php b/CRM/Admin/Form/Setting.php index 7503ab7c51..3064e2c9c4 100644 --- a/CRM/Admin/Form/Setting.php +++ b/CRM/Admin/Form/Setting.php @@ -56,12 +56,10 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { // we can handle all the ones defined in the metadata here. Others to be converted foreach ($this->_settings as $setting => $group) { - $settingMetaData = civicrm_api('setting', 'getfields', array('version' => 3, 'name' => $setting)); $this->_defaults[$setting] = civicrm_api('setting', 'getvalue', array( 'version' => 3, 'name' => $setting, 'group' => $group, - 'default_value' => CRM_Utils_Array::value('default', $settingMetaData['values'][$setting]), ) ); } -- 2.25.1