X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FAdmin%2FForm%2FSetting.php;h=2bc9abe2467647c60692d5e551f6688f6794ac4c;hb=752a3cbc3fd578e398ccd3773cc83b93c28805d8;hp=09c0b03842295585430788d12b4d72eed2d71d3f;hpb=2a071b0acf0f9458dddee5ee34b3649f383b67c3;p=civicrm-core.git diff --git a/CRM/Admin/Form/Setting.php b/CRM/Admin/Form/Setting.php index 09c0b03842..2bc9abe246 100644 --- a/CRM/Admin/Form/Setting.php +++ b/CRM/Admin/Form/Setting.php @@ -56,18 +56,9 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { $formMode = TRUE; } - CRM_Core_BAO_ConfigSetting::retrieve($this->_defaults); - - // we can handle all the ones defined in the metadata here. Others to be converted - foreach ($this->_settings as $setting => $group) { - $this->_defaults[$setting] = civicrm_api('setting', 'getvalue', array( - 'version' => 3, - 'name' => $setting, - 'group' => $group, - ) - ); - } + $this->setDefaultsForMetadataDefinedFields(); + // @todo thise should be retrievable from the above function. $this->_defaults['contact_autocomplete_options'] = self::getAutocompleteContactSearch(); $this->_defaults['contact_reference_options'] = self::getAutocompleteContactReference(); $this->_defaults['enableSSL'] = Civi::settings()->get('enableSSL'); @@ -154,7 +145,7 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { } try { $settings = $this->getSettingsToSetByMetadata($params); - civicrm_api3('setting', 'create', $settings); + $this->saveMetadataDefinedSettings($params); } catch (CiviCRM_API3_Exception $e) { CRM_Core_Session::setStatus($e->getMessage(), ts('Save Failed'), 'error');