public static function mergeTagList() {
$name = CRM_Utils_Type::escape($_GET['term'], 'String');
$fromId = CRM_Utils_Type::escape($_GET['fromId'], 'Integer');
- $limit = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'search_autocomplete_count', NULL, 10);
+ $limit = Civi::settings()->get('search_autocomplete_count');
// build used-for clause to be used in main query
$usedForTagA = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Tag', $fromId, 'used_for');
*/
public static function unclosedCases() {
$params = array(
- 'limit' => CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'search_autocomplete_count', NULL, 10),
+ 'limit' => Civi::settings()->get('search_autocomplete_count'),
'sort_name' => CRM_Utils_Type::escape(CRM_Utils_Array::value('term', $_GET, ''), 'String'),
);
return FALSE;
}
// If trash is disabled in system settings then we always skip
- if (!CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'contact_undelete', NULL, 1)) {
+ if (!Civi::settings()->get('contact_undelete')) {
$skipUndelete = TRUE;
}
//added external ID
$form->addElement('text', 'external_identifier', ts('External ID'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'external_identifier'));
- if (CRM_Core_Permission::check('access deleted contacts') and CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'contact_undelete', NULL)) {
+ if (CRM_Core_Permission::check('access deleted contacts') and Civi::settings()->get('contact_undelete')) {
$form->add('checkbox', 'deleted_contacts', ts('Search in Trash') . '<br />' . ts('(deleted contacts)'));
}
CRM_Core_Error::fatal(ts('You do not have permission to delete this contact.'));
}
- $this->assign('trash', CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'contact_undelete', NULL) and !$this->_skipUndelete);
+ $this->assign('trash', Civi::settings()->get('contact_undelete') and !$this->_skipUndelete);
$this->assign('restore', $this->_restore);
if ($this->_restore) {
$return = array_unique(array_merge(array('sort_name'), $list));
- $limit = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'search_autocomplete_count', NULL, 10);
+ $limit = Civi::settings()->get('search_autocomplete_count');
$params = array('offset' => 0, 'rowCount' => $limit, 'version' => 3);
foreach ($return as $fld) {
public static function getPCPList() {
$name = CRM_Utils_Array::value('term', $_GET);
$name = CRM_Utils_Type::escape($name, 'String');
- $limit = $max = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'search_autocomplete_count', NULL, 10);
+ $limit = $max = Civi::settings()->get('search_autocomplete_count');
$where = ' AND pcp.page_id = cp.id AND pcp.contact_id = cc.id';
if ($queryString) {
$offset = CRM_Utils_Array::value('offset', $_GET, 0);
- $rowCount = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'search_autocomplete_count', NULL, 10);
+ $rowCount = Civi::settings()->get('search_autocomplete_count');
$offset = CRM_Utils_Type::escape($offset, 'Int');
* default include message ID
*/
public static function includeMessageId() {
- return CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'include_message_id',
- NULL,
- FALSE
- );
+ return Civi::settings()->get('include_message_id');
}
/**
}
$from = implode(' ', $from);
$limit = (int) CRM_Utils_Array::value('limit', $params);
- $limit = $limit > 0 ? $limit : CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME, 'search_autocomplete_count', NULL, 10);
+ $limit = $limit > 0 ? $limit : Civi::settings()->get('search_autocomplete_count');
// add acl clause here
list($aclFrom, $aclWhere) = CRM_Contact_BAO_Contact_Permission::cacheClause('cc');
$defaults['description_field'][] = $field;
}
}
- $resultsPerPage = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'search_autocomplete_count', NULL, 10);
+ $resultsPerPage = Civi::settings()->get('search_autocomplete_count');
if (isset($request['params']) && isset($apiDefaults['params'])) {
$request['params'] += $apiDefaults['params'];
}
'description' => 'If enabled, CiviMail will deliver a copy of the email to each bulk email listed for the contact.',
'help_text' => NULL,
),
+ 'include_message_id' => array(
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'include_message_id',
+ 'type' => 'Integer',
+ 'html_type' => 'checkbox',
+ 'default' => FALSE,
+ 'add' => '4.5',
+ 'title' => 'Enable CiviMail to generate Message-ID header',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => '',
+ 'help_text' => NULL,
+ ),
);