Cleanup deprecated CRM_Core_BAO_Settings calls CRM-17507
[civicrm-core.git] / CRM / Admin / Form / Preferences / Mailing.php
index e1beccc42ec57fbff90eb8aabbef704aab594638..63bdb2072a244ce467cd9dfd144dd25d8ae75c72 100644 (file)
@@ -119,10 +119,7 @@ class CRM_Admin_Form_Preferences_Mailing extends CRM_Admin_Form_Preferences {
     $params = $this->controller->exportValues($this->_name);
 
     if (empty($params['write_activity_record'])) {
-      $existingViewOptions = CRM_Core_BAO_Setting::getItem(
-        CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
-        'contact_view_options'
-      );
+      $existingViewOptions = Civi::settings()->get('contact_view_options');
 
       $displayValue = CRM_Core_OptionGroup::getValue('contact_view_options', 'CiviMail', 'name');
       $viewOptions = explode(CRM_Core_DAO::VALUE_SEPARATOR, $existingViewOptions);