Commit 84fb7424 authored by totten's avatar totten

CRM_Core_BAO_Setting::getItem() - Fix calls which use deprecated parameters

parent 3a84c0ab
......@@ -319,7 +319,7 @@ class CRM_Core_BAO_ConfigSetting {
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;
......@@ -649,8 +649,7 @@ WHERE option_group_id = (
}
// 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);
......@@ -675,8 +674,7 @@ WHERE option_group_id = (
}
// 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);
......
......@@ -319,7 +319,7 @@ AND reset_date IS NULL
* @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');
}
/**
......
......@@ -75,7 +75,7 @@ class CRM_Core_InnoDBIndexer {
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;
......
......@@ -217,9 +217,7 @@ class CRM_Core_Page {
// 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');
}
......
......@@ -143,9 +143,7 @@ class CRM_Core_Resources {
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');
}
/**
......
......@@ -80,7 +80,7 @@ class CRM_Upgrade_Incremental_General {
}
}
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.
......
......@@ -178,4 +178,18 @@ return array(
'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,
),
);
......@@ -240,7 +240,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
*/
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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment