$this->_config->contact_id = $this->_contactID;
}
+ $settings = Civi::settings();
foreach ($this->_varNames as $groupName => $settingNames) {
- $values = CRM_Core_BAO_Setting::getItem($groupName);
- foreach ($values as $name => $value) {
- $this->_config->$name = $value;
+ foreach ($settingNames as $settingName => $options) {
+ $this->_config->$settingName = $settings->get($settingName);
}
}
$session->pushUserContext(CRM_Utils_System::url('civicrm/admin', 'reset=1'));
$this->addressSequence = isset($newSequence) ? $newSequence : "";
- if (empty($this->_config->address_format)) {
- $defaults['address_format'] = "
-{contact.street_address}
-{contact.supplemental_address_1}
-{contact.supplemental_address_2}
-{contact.city}{, }{contact.state_province}{ }{contact.postal_code}
-{contact.country}
-";
- }
- else {
- $defaults['address_format'] = $this->_config->address_format;
- }
-
- if (empty($this->_config->mailing_format)) {
- $defaults['mailing_format'] = "
-{contact.addressee}
-{contact.street_address}
-{contact.supplemental_address_1}
-{contact.supplemental_address_2}
-{contact.city}{, }{contact.state_province}{ }{contact.postal_code}
-{contact.country}
-";
- }
- else {
- $defaults['mailing_format'] = $this->_config->mailing_format;
- }
+ $defaults['address_format'] = $this->_config->address_format;
+ $defaults['mailing_format'] = $this->_config->mailing_format;
parent::cbsDefaultValues($defaults);