Cleanup deprecated CRM_Core_BAO_Settings calls CRM-17507
[civicrm-core.git] / CRM / Admin / Form / Preferences / Contribute.php
index d08996cd73e4c2af34d91810f6ed14ae7b09f56c..0a5513cbd2b051261b22f9d7523d877f28a12e95 100644 (file)
@@ -140,6 +140,7 @@ class CRM_Admin_Form_Preferences_Contribute extends CRM_Admin_Form_Preferences {
       $this->assign("{$setting}_description", ts($props['description']));
     }
     $this->add('checkbox', 'invoicing', ts('Enable Tax and Invoicing'));
+    $this->add('checkbox', 'acl_financial_type', ts('Enable Access Control by Financial Type'));
     parent::buildQuickForm();
   }
 
@@ -149,7 +150,7 @@ class CRM_Admin_Form_Preferences_Contribute extends CRM_Admin_Form_Preferences {
    * default values are retrieved from the database
    */
   public function setDefaultValues() {
-    $defaults = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+    $defaults = Civi::settings()->get('contribution_invoice_settings');
     //CRM-16691: Changes made related to settings of 'CVV'.
     foreach ($this->_settings as $setting => $group) {
       $settingMetaData = civicrm_api3('setting', 'getfields', array('name' => $setting));