From: Tim Otten Date: Wed, 20 Jan 2016 23:49:05 +0000 (-0800) Subject: CRM-17830 - Setting Form - Remove redundant default check X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=dc53734e221848e1adbf0a79040ee18f35e4edce;p=civicrm-core.git 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. --- 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]), ) ); }