CRM_Core_BAO_Setting::retrieveDirectoryAndURLPreferences($defaults);
// Pickup enabled-components from settings table if found.
- $enableComponents = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enable_components', NULL, array());
+ $enableComponents = Civi::settings()->get('enable_components');
if (!empty($enableComponents)) {
$defaults['enableComponents'] = $enableComponents;
}
// get enabled-components from DB and add to the list
- $enabledComponents
- = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enable_components', NULL, array());
+ $enabledComponents = Civi::settings()->get('enable_components');
$enabledComponents[] = $componentName;
self::setEnabledComponents($enabledComponents);
}
// get enabled-components from DB and add to the list
- $enabledComponents
- = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enable_components', NULL, array());
+ $enabledComponents = Civi::settings()->get('enable_components');
$enabledComponents = array_diff($enabledComponents, array($componentName));
self::setEnabledComponents($enabledComponents);
* @return object
*/
public static function isMultipleBulkMail() {
- return CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'civimail_multiple_bulk_emails', NULL, FALSE);
+ return Civi::settings()->get('civimail_multiple_bulk_emails');
}
/**
array('name'),
),
);
- $active = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME, 'enable_innodb_fts', NULL, FALSE);
+ $active = Civi::settings()->get('enable_innodb_fts');
self::$singleton = new self($active, $indices);
}
return self::$singleton;
// Intermittent alert to admins
CRM_Utils_Check::singleton()->showPeriodicAlerts();
- if ($this->useLivePageJS &&
- CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajaxPopupsEnabled', NULL, TRUE)
- ) {
+ if ($this->useLivePageJS && Civi::settings()->get('ajaxPopupsEnabled')) {
CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js', 1, 'html-header');
}
if (!$this->cacheCode) {
$this->resetCacheCode();
}
- $this->ajaxPopupsEnabled = (bool) CRM_Core_BAO_Setting::getItem(
- CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'ajaxPopupsEnabled', NULL, TRUE
- );
+ $this->ajaxPopupsEnabled = (bool) Civi::settings()->get('ajaxPopupsEnabled');
}
/**
}
}
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME, 'enable_innodb_fts', NULL, FALSE)) {
+ if (Civi::settings()->get('enable_innodb_fts')) {
// The FTS indexing feature dynamically manipulates the schema which could
// cause conflicts with other layers that manipulate the schema. The
// simplest thing is to turn it off and back on.
'description' => 'If enabled, a randomized hash key will be used to reference the mailing URL in the mailing.viewUrl token, instead of the mailing ID',
'help_text' => NULL,
),
+ 'civimail_multiple_bulk_emails' => array(
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'civimail_multiple_bulk_emails',
+ 'type' => 'Integer',
+ 'html_type' => 'checkbox',
+ 'default' => 0,
+ 'add' => '4.5',
+ 'title' => ' Multiple Bulk Emails',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'If enabled, CiviMail will deliver a copy of the email to each bulk email listed for the contact.',
+ 'help_text' => NULL,
+ ),
);
*/
public static function custom_data_entities() {
$entities = CRM_Core_BAO_CustomQuery::$extendsMap;
- $enabledComponents = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enable_components', NULL, array());
+ $enabledComponents = Civi::settings()->get('enable_components');
$customDataEntities = array();
$invalidEntities = array('Individual', 'Organization', 'Household');
$entitiesToFix = array('Case', 'Relationship');