*/
public function addAttachment(&$attachments, $contacts) {
// Check preferences setting
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'activity_assignee_notification_ics')) {
+ if (Civi::settings()->get('activity_assignee_notification_ics')) {
$config = &CRM_Core_Config::singleton();
$this->icsfile = tempnam($config->customFileUploadDir, 'ics');
if ($this->icsfile !== FALSE) {
$this->addFormRule(array('CRM_Activity_Form_Activity', 'formRule'), $this);
- if (CRM_Core_BAO_Setting::getItem(
- CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'activity_assignee_notification'
- )
- ) {
+ if (Civi::settings()->get('activity_assignee_notification')) {
$this->assign('activityAssigneeNotification', TRUE);
}
else {
// send copy to assignee contacts.CRM-4509
$mailStatus = '';
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'activity_assignee_notification')
- ) {
+ if (Civi::settings()->get('activity_assignee_notification')) {
$activityIDs = array($activity->id);
if ($followupActivity) {
$activityIDs = array_merge($activityIDs, array($followupActivity->id));
$session = CRM_Core_Session::singleton();
$userID = $session->get('userID');
if ($userID) {
- $defaults = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::PERSONAL_PREFERENCES_NAME,
- 'activity_tab_filter',
- NULL,
- NULL,
- $userID
- );
+ $defaults = Civi::service('settings_manager')
+ ->getBagByContact(NULL, $userID)
+ ->get('activity_tab_filter');
}
return $defaults;
}
* 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));
$wysiwyg_options = CRM_Core_OptionGroup::values('wysiwyg_editor', FALSE, FALSE, FALSE, NULL, 'label', TRUE, FALSE, 'name');
//changes for freezing the invoices/credit notes checkbox if invoicing is uncheck
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$this->assign('invoicing', $invoicing);
$extra = array();
$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);
$this->_defaults['contact_autocomplete_options'] = self::getAutocompleteContactSearch();
$this->_defaults['contact_reference_options'] = self::getAutocompleteContactReference();
- $this->_defaults['enableSSL'] = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enableSSL');
- $this->_defaults['verifySSL'] = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL');
+ $this->_defaults['enableSSL'] = Civi::settings()->get('enableSSL');
+ $this->_defaults['verifySSL'] = Civi::settings()->get('verifySSL');
$this->_defaults['enableComponents'] = Civi::settings()->get('enable_components');
}
}
}
- $mailingBackend = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'mailing_backend'
- );
+ $mailingBackend = Civi::settings()->get('mailing_backend');
if (!empty($mailingBackend)) {
$formValues = array_merge($mailingBackend, $formValues);
if (!$this->_defaults) {
$this->_defaults = array();
- $mailingBackend = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'mailing_backend'
- );
+ $mailingBackend = Civi::settings()->get('mailing_backend');
if (!empty($mailingBackend)) {
$this->_defaults = $mailingBackend;
$sql = 'UPDATE civicrm_activity_contact SET contact_id = %2 WHERE activity_id = %1 AND record_type_id = %3';
CRM_Core_DAO::executeQuery($sql, $params);
// remove 'Unconfirmed' tag for this contact
- $tag_name = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'tag_unconfirmed',
- NULL,
- 'Unconfirmed'
- );
+ $tag_name = Civi::settings()->get('tag_unconfirmed');
$sql = "
DELETE FROM civicrm_entity_tag
*/
// check if the group defined by CIVICRM_PETITION_CONTACTS exists, else create it
- $petitionGroupName = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'petition_contacts',
- NULL,
- 'Petition Contacts'
- );
+ $petitionGroupName = Civi::settings()->get('petition_contacts');
$dao = new CRM_Contact_DAO_Group();
$dao->title = $petitionGroupName;
* Form submission of petition signature.
*/
public function postProcess() {
- $tag_name = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CAMPAIGN_PREFERENCES_NAME,
- 'tag_unconfirmed'
- );
+ $tag_name = Civi::settings()->get('tag_unconfirmed');
if ($tag_name) {
// Check if contact 'email confirmed' tag exists, else create one
$selectedContacts = array('contact_check');
$activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name');
$assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts);
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'activity_assignee_notification'
- )
- ) {
+ if (Civi::settings()->get('activity_assignee_notification')) {
$selectedContacts[] = 'assignee_contact_id';
}
}
// Add parameters for attachments
- $numAttachments = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'max_attachments');
+ $numAttachments = Civi::settings()->get('max_attachments');
for ($i = 1; $i <= $numAttachments; $i++) {
$attachName = "attachFile_$i";
if (isset($params[$attachName]) && !empty($params[$attachName])) {
// Add parameters for attachments
- $numAttachments = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'max_attachments');
+ $numAttachments = Civi::settings()->get('max_attachments');
for ($i = 1; $i <= $numAttachments; $i++) {
$attachName = "attachFile_$i";
if (isset($params[$attachName]) && !empty($params[$attachName])) {
$params['contact_id'] = $contact->id;
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME, 'is_enabled')) {
+ if (Civi::settings()->get('is_enabled')) {
// Enabling multisite causes the contact to be added to the domain group.
$domainGroupID = CRM_Core_BAO_Domain::getGroupId();
if (!empty($domainGroupID)) {
FROM civicrm_contact
INNER JOIN civicrm_email ON ( civicrm_contact.id = civicrm_email.contact_id )";
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME, 'uniq_email_per_site')) {
+ if (Civi::settings()->get('uniq_email_per_site')) {
// try to find a match within a site (multisite).
$groups = CRM_Core_BAO_Domain::getChildGroupIds();
if (!empty($groups)) {
$query = "DELETE FROM civicrm_acl_entity_role where entity_table = 'civicrm_group' AND entity_id = %1";
CRM_Core_DAO::executeQuery($query, $params);
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
- 'is_enabled'
- )
- ) {
+ if (Civi::settings()->get('is_enabled')) {
// clear any descendant groups cache if exists
CRM_Core_BAO_Cache::deleteGroup('descendant groups for an org');
}
if (CRM_Utils_Array::value('no_parent', $params) !== 1) {
if (empty($params['parents']) &&
$domainGroupID != $group->id &&
- CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
- 'is_enabled'
- ) &&
+ Civi::settings()->get('is_enabled') &&
!CRM_Contact_BAO_GroupNesting::hasParentGroups($group->id)
) {
// if no parent present and the group doesn't already have any parents,
}
//build the sort name.
- $format = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'sort_name_format'
- );
+ $format = Civi::settings()->get('sort_name_format');
$sortName = CRM_Utils_Address::format($formatted, $format,
FALSE, FALSE, TRUE, $tokenFields
);
$sortName = trim($sortName);
//build the display name.
- $format = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'display_name_format'
- );
+ $format = Civi::settings()->get('display_name_format');
$displayName = CRM_Utils_Address::format($formatted, $format,
FALSE, FALSE, TRUE, $tokenFields
);
$this->_element["{$tName}_id"] = 1;
if (substr($tName, -15) == '-state_province') {
// FIXME: hack to fix CRM-1900
- $a = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'address_format'
- );
+ $a = Civi::settings()->get('address_format');
if (substr_count($a, 'state_province_name') > 0) {
$this->_pseudoConstantsSelect["{$name}-{$elementFullName}"] = array(
}
if (!$inlineEditMode) {
- $checkSimilar = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'contact_ajax_check_similar',
- NULL,
- TRUE
- );
+ $checkSimilar = Civi::settings()->get('contact_ajax_check_similar');
if ($checkSimilar == NULL) {
$checkSimilar = 0;
$followupActivity = CRM_Activity_BAO_Activity::createFollowupActivity($activityId, $params);
$followupStatus = ts('A followup activity has been scheduled.');
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'activity_assignee_notification')) {
+ if (Civi::settings()->get('activity_assignee_notification')) {
if ($followupActivity) {
$mailToFollowupContacts = array();
$assignee = array($followupActivity->id);
$config = CRM_Core_Config::singleton();
$locName = NULL;
//get the address format sequence from the config file
- $mailingFormat = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'mailing_format'
- );
+ $mailingFormat = Civi::settings()->get('mailing_format');
$sequence = CRM_Utils_Address::sequence($mailingFormat);
//build the returnproperties
$returnProperties = array('display_name' => 1, 'contact_type' => 1, 'prefix_id' => 1);
- $mailingFormat = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'mailing_format'
- );
+ $mailingFormat = Civi::settings()->get('mailing_format');
$mailingFormatProperties = array();
if ($mailingFormat) {
//build the return properties
$returnProperties = array('display_name' => 1, 'contact_type' => 1, 'prefix_id' => 1);
- $mailingFormat = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'mailing_format'
- );
+ $mailingFormat = Civi::settings()->get('mailing_format');
$mailingFormatProperties = array();
if ($mailingFormat) {
* [street_address => 1, supplemental_address_1 => 1, supplemental_address_2 => 1]
*/
public static function getAddressReturnProperties() {
- $mailingFormat = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'mailing_format'
- );
+ $mailingFormat = Civi::settings()->get('mailing_format');
$addressFields = CRM_Utils_Address::sequence($mailingFormat);
$addressReturnProperties = array_fill_keys($addressFields, 1);
* @return array
*/
public static function getTokenData(&$contacts) {
- $mailingFormat = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'mailing_format'
- );
+ $mailingFormat = Civi::settings()->get('mailing_format');
$tokens = $tokenFields = array();
$messageToken = CRM_Utils_Token::getTokens($mailingFormat);
//CRM-7265 --time being fix.
$config = CRM_Core_Config::singleton();
$image_URL = str_replace('https://', 'http://', $image_URL);
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enableSSL')) {
+ if (Civi::settings()->get('enableSSL')) {
$image_URL = str_replace('http://', 'https://', $image_URL);
}
if ($contactType == 'Organization' &&
CRM_Core_Permission::check('administer Multiple Organizations') &&
- CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
- 'is_enabled'
- )
- ) {
+ Civi::settings()->get('is_enabled')) {
//check is any relationship between the organization and groups
$groupOrg = CRM_Contact_BAO_GroupOrganization::hasGroupAssociated($this->_contactId);
if ($groupOrg) {
$this->assign_by_ref('groupOut', $out);
// get the info on contact smart groups
- $contactSmartGroupSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'contact_smart_group_display');
+ $contactSmartGroupSettings = Civi::settings()->get('contact_smart_group_display');
$this->assign('contactSmartGroupSettings', $contactSmartGroupSettings);
$this->ajaxResponse['tabCount'] = count($in);
}
$groupNum = CRM_Contact_BAO_GroupContact::getContactGroup($contactID, 'Added', NULL, TRUE, TRUE);
- if ($groupNum == 1 &&
- $groupStatus == 'Removed' &&
- CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
- 'is_enabled'
- )
- ) {
+ if ($groupNum == 1 && $groupStatus == 'Removed' && Civi::settings()->get('is_enabled')) {
CRM_Core_Session::setStatus(ts('Please ensure at least one contact group association is maintained.'), ts('Could Not Remove'));
return FALSE;
}
$params['noRelationships'] = $params['noNotes'] = $params['noGroups'] = TRUE;
$contact = CRM_Contact_BAO_Contact::retrieve($params, $defaults, TRUE);
// Let summary page know if outbound mail is disabled so email links can be built conditionally
- $mailingBackend = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'mailing_backend');
+ $mailingBackend = Civi::settings()->get('mailing_backend');
$this->assign('mailingOutboundOption', $mailingBackend['outBound_option']);
$communicationType = array(
CRM_Financial_BAO_FinancialItem::create($itemParams, NULL, $trxnIds);
if ($fieldValues['tax_amount']) {
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings);
$itemParams['amount'] = $diff * $fieldValues['tax_amount'];
$itemParams['description'] = $taxTerm;
* Credit Note Id.
*/
public static function createCreditNoteId() {
- $prefixValue = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $prefixValue = Civi::settings()->get('contribution_invoice_settings');
$creditNoteNum = CRM_Core_DAO::singleValueQuery("SELECT count(creditnote_id) as creditnote_number FROM civicrm_contribution");
$creditNoteId = NULL;
//send email with pdf invoice
$template = CRM_Core_Smarty::singleton();
$taxAmt = $template->get_template_vars('dataArray');
- $prefixValue = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $prefixValue = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $prefixValue);
if (isset($invoicing) && isset($prefixValue['is_email_pdf'])) {
$sendTemplateParams['isEmailPdf'] = TRUE;
$template = CRM_Core_Smarty::singleton();
$taxAmt = $template->get_template_vars('dataArray');
$eventTaxAmt = $template->get_template_vars('totalTaxAmount');
- $prefixValue = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $prefixValue = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $prefixValue);
if ((!empty($taxAmt) || isset($eventTaxAmt)) && (isset($invoicing) && isset($prefixValue['is_email_pdf']))) {
$isEmailPdf = TRUE;
),
)
);
- $mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'mailing_backend'
- );
+ $mailingInfo = Civi::settings()->get('mailing_backend');
$this->assign('outBound_option', $mailingInfo['outBound_option']);
$this->addFormRule(array('CRM_Contribute_Form_AdditionalPayment', 'formRule'), $this);
// build price set form.
$buildPriceSet = FALSE;
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$this->assign('invoicing', $invoicing);
$js = array('onclick' => "return verify( );");
}
- $mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'mailing_backend'
- );
+ $mailingInfo = Civi::settings()->get('mailing_backend');
$this->assign('outBound_option', $mailingInfo['outBound_option']);
$this->addButtons(array(
*/
protected function invoicingPostProcessHook($submittedValues, $action, $lineItem) {
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
if (!CRM_Utils_Array::value('invoicing', $invoiceSettings)) {
return;
}
$amount_block_is_active = $this->get('amount_block_is_active');
$this->assign('amount_block_is_active', $amount_block_is_active);
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
if ($invoicing) {
$getTaxDetails = FALSE;
);
$contribution = CRM_Contribute_BAO_Contribution::add($contributionParams);
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
if ($invoicing) {
$dataArray = array();
$this->assign('useForMember', $this->get('useForMember'));
$params = $this->_params;
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
if ($invoicing) {
$getTaxDetails = FALSE;
// assign values to the template
$this->assign($values);
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$this->assign('invoicing', $invoicing);
if ($invoicing && isset($values['tax_amount'])) {
$cancelledStatusId = CRM_Utils_Array::key('Cancelled', $contributionStatusID);
// getting data from admin page
- $prefixValue = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $prefixValue = Civi::settings()->get('contribution_invoice_settings');
foreach ($invoiceElements['details'] as $contribID => $detail) {
$input = $ids = $objects = array();
* loads, it decides the which action has to be taken for the page.
*/
public function run() {
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$this->assign('invoicing', $invoicing);
parent::preProcess();
}
// remove action "Invoices - print or email"
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
if (!$invoicing) {
unset(self::$_tasks[9]);
$config = CRM_Core_Config::singleton();
- $asp = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::ADDRESS_STANDARDIZATION_PREFERENCES_NAME,
- 'address_standardization_provider'
- );
+ $asp = Civi::settings()->get('address_standardization_provider');
// clean up the address via USPS web services if enabled
if ($asp === 'USPS' &&
$params['country_id'] == 1228
'first_name' => $rows[$rowID]['first_name'],
'individual_prefix' => $rows[$rowID]['individual_prefix'],
);
- $format = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'display_name_format');
+ $format = Civi::settings()->get('display_name_format');
$firstNameWithPrefix = CRM_Utils_Address::format($formatted, $format, FALSE, FALSE, TRUE);
$firstNameWithPrefix = trim($firstNameWithPrefix);
return $groupID;
}
- $domainGroupID = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
- 'domain_group_id'
- );
- $multisite = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
- 'is_enabled'
- );
+ $domainGroupID = Civi::settings()->get('domain_group_id');
+ $multisite = Civi::settings()->get('is_enabled');
if ($domainGroupID) {
$groupID = $domainGroupID;
public static function buildAttachment(&$form, $entityTable, $entityID = NULL, $numAttachments = NULL, $ajaxDelete = FALSE) {
if (!$numAttachments) {
- $numAttachments = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'max_attachments');
+ $numAttachments = Civi::settings()->get('max_attachments');
}
// Assign maxAttachments count to template for help message
$form->assign('maxAttachments', $numAttachments);
CRM_Core_BAO_File::deleteEntityFile($entityTable, $entityID);
}
- $numAttachments = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'max_attachments');
+ $numAttachments = Civi::settings()->get('max_attachments');
$now = date('Ymdhis');
* @param int $entityID
*/
public static function processAttachment(&$params, $entityTable, $entityID) {
- $numAttachments = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'max_attachments');
+ $numAttachments = Civi::settings()->get('max_attachments');
for ($i = 1; $i <= $numAttachments; $i++) {
if (
* @return array
*/
public static function uploadNames() {
- $numAttachments = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'max_attachments');
+ $numAttachments = Civi::settings()->get('max_attachments');
$names = array();
for ($i = 1; $i <= $numAttachments; $i++) {
* @return object|string
*/
public static function getCacheKey($cid) {
- $key = CRM_Core_BAO_Setting::getItem(
- CRM_Core_BAO_Setting::PERSONAL_PREFERENCES_NAME,
- 'navigation',
- NULL,
- '',
- $cid
- );
+ $key = Civi::service('settings_manager')
+ ->getBagByContact(NULL, $cid)
+ ->get('navigation');
if (strlen($key) !== self::CACHE_KEY_STRLEN) {
$key = self::resetNavigation($cid);
}
// check for double optin
$config = CRM_Core_Config::singleton();
if (in_array('CiviMail', $config->enableComponents)) {
- return CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'profile_double_optin', NULL, FALSE
- );
+ return Civi::settings()->get('profile_double_optin');
}
return FALSE;
}
// check for add to group double optin
$config = CRM_Core_Config::singleton();
if (in_array('CiviMail', $config->enableComponents)) {
- return CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'profile_add_to_group_double_optin', NULL, FALSE
- );
+ return Civi::settings()->get('profile_add_to_group_double_optin');
}
return FALSE;
}
$dedupeParams['check_permission'] = FALSE;
$ids = CRM_Dedupe_Finder::dupesByParams($dedupeParams, 'Individual');
- if (!empty($ids) &&
- CRM_Core_BAO_Setting::getItem(
- CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
- 'uniq_email_per_site'
- )
- ) {
+ if (!empty($ids) && Civi::settings()->get('uniq_email_per_site')) {
// restrict dupeIds to ones that belong to current domain/site.
$siteContacts = CRM_Core_BAO_Domain::getContactList();
foreach ($ids as $index => $dupeId) {
* @return string
*/
public static function getContactDefaultLanguage() {
- $language = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, 'contact_default_language');
+ $language = Civi::settings()->get('contact_default_language');
if ($language == 'undefined') {
return NULL;
}
* @deprecated
*/
public static function createCivimailLock($name) {
- $serverWideLock = \CRM_Core_BAO_Setting::getItem(
- \CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'civimail_server_wide_lock'
- );
+ $serverWideLock = \Civi::settings()->get('civimail_server_wide_lock');
return new static($name, NULL, $serverWideLock);
}
curl_setopt($submit, CURLOPT_POST, TRUE);
curl_setopt($submit, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($submit, CURLOPT_POSTFIELDS, implode('&', $postFields));
- curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
+ curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
$response = curl_exec($submit);
curl_setopt($submit, CURLOPT_HEADER, 1);
curl_setopt($submit, CURLOPT_POSTFIELDS, $arbXML);
curl_setopt($submit, CURLOPT_POST, 1);
- curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
+ curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
$response = curl_exec($submit);
curl_setopt($submit, CURLOPT_HEADER, 1);
curl_setopt($submit, CURLOPT_POSTFIELDS, $arbXML);
curl_setopt($submit, CURLOPT_POST, 1);
- curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
+ curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
$response = curl_exec($submit);
curl_setopt($submit, CURLOPT_HEADER, 1);
curl_setopt($submit, CURLOPT_POSTFIELDS, $arbXML);
curl_setopt($submit, CURLOPT_POST, 1);
- curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
+ curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
$response = curl_exec($submit);
curl_setopt($submit, CURLOPT_HEADER, 1);
curl_setopt($submit, CURLOPT_POSTFIELDS, $arbXML);
curl_setopt($submit, CURLOPT_POST, 1);
- curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
+ curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
$response = curl_exec($submit);
return self::errorExit(9004, 'Could not initiate connection to payment gateway');
}
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL') ? 2 : 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, Civi::settings()->get('verifySSL') ? 2 : 0);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
// return the result on success, FALSE on failure
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 36000);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $requestxml);
curl_setopt($ch, CURLOPT_SSLCERT, $key);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL') ? 2 : 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, Civi::settings()->get('verifySSL') ? 2 : 0);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
// return the result on success, FALSE on failure
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 36000);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
//turning off the server and peer verification(TrustManager Concept).
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL') ? 2 : 0);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, Civi::settings()->get('verifySSL') ? 2 : 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
//turning off the server and peer verification(TrustManager Concept).
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL') ? 2 : 0);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, Civi::settings()->get('verifySSL') ? 2 : 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
}
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
// this line makes it work under https
curl_setopt($ch, CURLOPT_POSTFIELDS, $payflow_query);
//adding POST data
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL') ? 2 : 0);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, Civi::settings()->get('verifySSL') ? 2 : 0);
//verifies ssl certificate
curl_setopt($ch, CURLOPT_FORBID_REUSE, TRUE);
//forces closure of connection when done
curl_setopt($curl, CURLOPT_SSLVERSION, 0);
if (strtoupper(substr(@php_uname('s'), 0, 3)) === 'WIN') {
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL') ? 2 : 0);
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
+ curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, Civi::settings()->get('verifySSL') ? 2 : 0);
}
return $curl;
}
curl_setopt($submit, CURLOPT_HTTPHEADER, array('SOAPAction: ""'));
curl_setopt($submit, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($submit, CURLOPT_TIMEOUT, 60);
- curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
+ curl_setopt($submit, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
curl_setopt($submit, CURLOPT_HEADER, 0);
// take caching out of the picture
* @return bool
*/
public static function isMultisiteEnabled() {
- return CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
- 'is_enabled'
- ) ? TRUE : FALSE;
+ return Civi::settings()->get('is_enabled') ? TRUE : FALSE;
}
/**
$this->strings = new CRM_Core_Resources_Strings($cache);
$this->cacheCodeKey = $cacheCodeKey;
if ($cacheCodeKey !== NULL) {
- $this->cacheCode = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, $cacheCodeKey);
+ $this->cacheCode = Civi::settings()->get($cacheCodeKey);
}
if (!$this->cacheCode) {
$this->resetCacheCode();
if (!empty($config->customCSSURL)) {
$this->addStyleUrl($config->customCSSURL, 99, $region);
}
- if (!CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'disable_core_css')) {
+ if (!Civi::settings()->get('disable_core_css')) {
$this->addStyleFile('civicrm', 'css/civicrm.css', -99, $region);
}
// crm-i.css added ahead of other styles so it can be overridden by FA.
"js/wysiwyg/crm.wysiwyg.js",
);
// add wysiwyg editor
- $editor = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'editor_id');
+ $editor = Civi::settings()->get('editor_id');
if ($editor == "CKEditor") {
$items[] = "js/wysiwyg/crm.ckeditor.js";
$ckConfig = CRM_Admin_Page_CKEditorConfig::getConfigUrl();
require_once 'api/v3/utils.php';
// FIXME: Shouldn't the X-Forwarded-Proto check be part of CRM_Utils_System::isSSL()?
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enableSSL') &&
+ if (Civi::settings()->get('enableSSL') &&
!CRM_Utils_System::isSSL() &&
strtolower(CRM_Utils_Array::value('X_FORWARDED_PROTO', CRM_Utils_System::getRequestHeaders())) != 'https'
) {
// In practice, this may not be necessary, but we want to prevent
// edge-cases that downgrade security-level below system policy.
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enableSSL')) {
+ if (Civi::settings()->get('enableSSL')) {
$civiUrl = preg_replace('/^http:/', 'https:', $civiUrl);
}
$result = parent::createStreamOpts($verb, $url, $blob, $headers);
$caConfig = CA_Config_Stream::probe(array(
- 'verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'),
+ 'verify_peer' => (bool) Civi::settings()->get('verifySSL'),
));
if ($caConfig->isEnableSSL()) {
$result['ssl'] = $caConfig->toStreamOptions();
public function getBlogUrl() {
// Note: We use "*default*" as the default (rather than self::BLOG_URL) so that future
// developers can change BLOG_URL without needing to update {civicrm_setting}.
- $url = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'blogUrl', NULL, '*default*');
+ $url = Civi::settings()->get('blogUrl');
if ($url === '*default*') {
$url = self::BLOG_URL;
}
$optionGroupId = $optionGroupDAO->id;
}
// Get the event summary display preferences
- $show_max_events = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME,
- 'show_events'
- );
+ $show_max_events = Civi::settings()->get('show_events');
// default to 10 if no option is set
if (is_null($show_max_events)) {
$show_max_events = 10;
$permissions = CRM_Core_Permission::event(CRM_Core_Permission::VIEW);
// check if we're in shopping cart mode for events
- $enable_cart = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME,
- 'enable_cart'
- );
+ $enable_cart = Civi::settings()->get('enable_cart');
if ($enable_cart) {
}
while ($dao->fetch()) {
// append invoice pdf to email
$template = CRM_Core_Smarty::singleton();
$taxAmt = $template->get_template_vars('totalTaxAmount');
- $prefixValue = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $prefixValue = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $prefixValue);
if (isset($invoicing) && isset($prefixValue['is_email_pdf']) && !empty($values['contributionId'])) {
$sendTemplateParams['isEmailPdf'] = TRUE;
$updateFinancialItemInfoDAO = CRM_Core_DAO::executeQuery($updateFinancialItem);
$trxn = CRM_Core_BAO_FinancialTrxn::getFinancialTrxnId($contributionId, 'DESC', TRUE);
$trxnId['id'] = $trxn['financialTrxnId'];
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings);
$updateFinancialItemInfoValues = array();
$financialItemsArray = array();
if ($fieldName == 'status_id' && $context != 'validate') {
// Get rid of cart-related option if disabled
// FIXME: Why does this option even exist if cart is disabled?
- if (!CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME, 'enable_cart')) {
+ if (!Civi::settings()->get('enable_cart')) {
$params['condition'][] = "name <> 'Pending in cart'";
}
}
CRM_Event_Form_Registration::initEventFee($form, $event['id']);
CRM_Event_Form_Registration_Register::buildAmount($form, TRUE, $form->_discountId);
$lineItem = array();
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$totalTaxAmount = 0;
if (!CRM_Utils_System::isNull(CRM_Utils_Array::value('line_items', $form->_values))) {
}
}
- $mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'mailing_backend'
- );
+ $mailingInfo = Civi::settings()->get('mailing_backend');
$form->assign('outBound_option', $mailingInfo['outBound_option']);
$form->assign('hasPayment', $form->_paymentId);
}
}
// check if we're in shopping cart mode for events
- $enableCart = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME,
- 'enable_cart'
- );
+ $enableCart = Civi::settings()->get('enable_cart');
if (!$enableCart) {
unset($tabs['conference']);
}
if ($this->_isPaidEvent) {
// fix amount for each of participants ( for bulk mode )
$eventAmount = array();
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$totalTaxAmount = 0;
$contributionId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment',
$this->_id, 'contribution_id', 'participant_id'
);
- $prefixValue = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $prefixValue = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $prefixValue);
if (count($taxAmt) > 0 && (isset($invoicing) && isset($prefixValue['is_email_pdf']))) {
$sendTemplateParams['isEmailPdf'] = TRUE;
$displayName = CRM_Contact_BAO_Contact::displayName($values[$participantID]['contact_id']);
$participantCount = array();
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$totalTaxAmount = 0;
foreach ($lineItem as $k => $v) {
}
}
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings);
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
if ($invoicing) {
}
$entityTable = 'civicrm_participant';
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$totalTaxAmount = 0;
$dataArray = array();
}
$this->assignToTemplate();
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings);
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$getTaxDetails = FALSE;
CRM_Utils_System::setTitle(ts('CiviEvent'));
$eventSummary = CRM_Event_BAO_Event::getEventSummary();
- $enableCart = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME,
- 'enable_cart'
- );
+ $enableCart = Civi::settings()->get('enable_cart');
$eventSummary['tab'] = CRM_Event_Page_ManageEvent::tabs($enableCart);
$actionColumn = FALSE;
$labelClass = 'price_set_field-label';
}
// show tax rate with amount
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings);
$displayOpt = CRM_Utils_Array::value('tax_display_settings', $invoiceSettings);
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
}
// check if we're in shopping cart mode for events
- $enable_cart = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME,
- 'enable_cart'
- );
-
+ $enable_cart = Civi::settings()->get('enable_cart');
if ($enable_cart) {
$link = CRM_Event_Cart_BAO_EventInCart::get_registration_link($this->_id);
$registerText = $link['label'];
$this->assign('location', $values['location']);
if (CRM_Core_Permission::check('access CiviEvent')) {
- $enableCart = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME, 'enable_cart');
+ $enableCart = Civi::settings()->get('enable_cart');
$this->assign('manageEventLinks', CRM_Event_Page_ManageEvent::tabs($enableCart));
}
}
elseif ($html) {
// check if we're in shopping cart mode for events
- $enable_cart = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME,
- 'enable_cart'
- );
+ $enable_cart = Civi::settings()->get('enable_cart');
if ($enable_cart) {
$this->assign('registration_links', TRUE);
}
$eventPCPS[$pcpDao->entity_id] = $pcpDao->entity_id;
}
// check if we're in shopping cart mode for events
- $enableCart = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME,
- 'enable_cart'
- );
+ $enableCart = Civi::settings()->get('enable_cart');
$this->assign('eventCartEnabled', $enableCart);
$mapping = CRM_Utils_Array::first(CRM_Core_BAO_ActionSchedule::getMappings(array(
'id' => CRM_Event_ActionMapping::EVENT_NAME_MAPPING_ID,
*/
public function makeCSV($export) {
// getting data from admin page
- $prefixValue = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $prefixValue = Civi::settings()->get('contribution_invoice_settings');
foreach ($export as $batchId => $dao) {
$financialItems = array();
);
if ($taxTrxnID) {
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings);
$params['amount'] = $lineItem->tax_amount;
$params['description'] = $taxTerm;
return FALSE;
}
- $allowPermDelete = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'allowPermDeleteFinancial');
+ $allowPermDelete = Civi::settings()->get('allowPermDeleteFinancial');
if (!$allowPermDelete) {
$sql = 'SELECT DISTINCT(cc.id), cc.display_name FROM civicrm_contact cc
if (array_key_exists('acl_financial_type', self::$_statusACLFt)) {
return self::$_statusACLFt['acl_financial_type'];
}
- $contributeSettings = CRM_Core_BAO_Setting::getItem(
- CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings'
- );
+ $contributeSettings = Civi::settings()->get('contribution_invoice_settings');
self::$_statusACLFt['acl_financial_type'] = FALSE;
if (CRM_Utils_Array::value('acl_financial_type', $contributeSettings)) {
self::$_statusACLFt['acl_financial_type'] = TRUE;
$errors['body'] = ts('Field "body_html" or "body_text" is required.');
}
- if (!CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'disable_mandatory_tokens_check')) {
+ if (!Civi::settings()->get('disable_mandatory_tokens_check')) {
$header = $mailing->header_id && $mailing->header_id != 'null' ? CRM_Mailing_BAO_Component::findById($mailing->header_id) : NULL;
$footer = $mailing->footer_id && $mailing->footer_id != 'null' ? CRM_Mailing_BAO_Component::findById($mailing->footer_id) : NULL;
foreach (array('body_html', 'body_text') as $field) {
*/
public static function getMailingHash($id) {
$hash = NULL;
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'hash_mailing_url')) {
+ if (Civi::settings()->get('hash_mailing_url')) {
$hash = CRM_Core_DAO::getFieldValue('CRM_Mailing_BAO_Mailing', $id, 'hash', 'id');
}
return $hash;
}
if ($writeActivity === NULL) {
- $writeActivity = CRM_Core_BAO_Setting::getItem(
- CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'write_activity_record',
- NULL,
- TRUE
- );
+ $writeActivity = Civi::settings()->get('write_activity_record');
}
if (!$writeActivity) {
'mailTokens' => $mailTokens['values'],
'contactid' => $contactID,
'requiredTokens' => CRM_Utils_Token::getRequiredTokens(),
- 'enableReplyTo' => (int) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'replyTo'),
- 'disableMandatoryTokensCheck' => (int) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'disable_mandatory_tokens_check'),
+ 'enableReplyTo' => (int) Civi::settings()->get('replyTo'),
+ 'disableMandatoryTokensCheck' => (int) Civi::settings()->get('disable_mandatory_tokens_check'),
'fromAddress' => $fromAddress['values'],
'defaultTestEmail' => civicrm_api3('Contact', 'getvalue', array(
'id' => 'user_contact_id',
return FALSE;
}
- $enableWorkflow = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'civimail_workflow',
- NULL,
- FALSE
- );
+ $enableWorkflow = Civi::settings()->get('civimail_workflow');
return ($enableWorkflow &&
$config->userSystem->is_drupal
}
// mailing key check
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'hash_mailing_url')) {
+ if (Civi::settings()->get('hash_mailing_url')) {
$this->_mailing = new CRM_Mailing_BAO_Mailing();
if (!is_numeric($this->_mailingID)) {
$this->assign('taxRates', json_encode(CRM_Core_PseudoConstant::getTaxRates()));
$this->assign('currency', CRM_Core_Config::singleton()->defaultCurrencySymbol);
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
if (isset($invoicing)) {
$this->assign('taxTerm', CRM_Utils_Array::value('tax_term', $invoiceSettings));
$this->addFormRule(array('CRM_Member_Form_Membership', 'formRule'), $this);
- $this->assign('outBound_option', CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'mailing_backend'));
+ $this->assign('outBound_option', Civi::settings()->get('mailing_backend'));
parent::buildQuickForm();
}
$template = CRM_Core_Smarty::singleton();
$taxAmt = $template->get_template_vars('dataArray');
$eventTaxAmt = $template->get_template_vars('totalTaxAmount');
- $prefixValue = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $prefixValue = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $prefixValue);
if ((!empty($taxAmt) || isset($eventTaxAmt)) && (isset($invoicing) && isset($prefixValue['is_email_pdf']))) {
$isEmailPdf = TRUE;
}
if (!empty($lineItem[$this->_priceSetId])) {
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$taxAmount = FALSE;
$totalTaxAmount = 0;
$taxRates = CRM_Core_PseudoConstant::getTaxRates();
$taxRate = CRM_Utils_Array::value($allMemberships[$defaults['membership_type_id']]['financial_type_id'], $taxRates);
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
// auto renew options if enabled for the membership
$options = CRM_Core_SelectValues::memberAutoRenew();
// The member form uses emailExists. Assigning both while we transition / synchronise.
$this->assign('emailExists', $this->_contributorEmail);
- $mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'mailing_backend'
- );
+ $mailingInfo = Civi::settings()->get('mailing_backend');
$this->assign('outBound_option', $mailingInfo['outBound_option']);
if (CRM_Core_DAO::getFieldValue('CRM_Member_DAO_Membership', $this->_id, 'contribution_recur_id')) {
$membership[$dao->id]['renewPageId'] = CRM_Member_BAO_Membership::getContributionPageId($dao->id);
if (!$membership[$dao->id]['renewPageId']) {
// Membership payment was not done via online contribution page or free membership. Check for default membership renewal page from CiviMember Settings
- $defaultRenewPageId = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MEMBER_PREFERENCES_NAME,
- 'default_renewal_contribution_page'
- );
+ $defaultRenewPageId = Civi::settings()->get('default_renewal_contribution_page');
if ($defaultRenewPageId) {
//CRM-14831 - check if membership type is present in contrib page
$memBlock = CRM_Member_BAO_Membership::getMembershipBlock($defaultRenewPageId);
array('' => ts('- select -')) + $pledgePages
);
- $mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'mailing_backend'
- );
+ $mailingInfo = Civi::settings()->get('mailing_backend');
$this->assign('outBound_option', $mailingInfo['outBound_option']);
// build custom data
);
$getTaxDetails = FALSE;
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
if ($overrideWhereClause) {
$whereClause = $overrideWhereClause;
//use value field.
$valueFieldName = 'amount';
$seperator = '|';
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings);
$displayOpt = CRM_Utils_Array::value('tax_display_settings', $invoiceSettings);
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$priceFieldBAO->find();
// display taxTerm for priceFields
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings);
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$getTaxDetails = FALSE;
$financialType = CRM_Contribute_PseudoConstant::financialType();
$taxRate = CRM_Core_PseudoConstant::getTaxRates();
// display taxTerm for priceFields
- $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings');
+ $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings);
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$getTaxDetails = FALSE;
* @return int
*/
public static function updateWysiwyg() {
- $editorID = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'editor_id');
+ $editorID = Civi::settings()->get('editor_id');
// Previously a numeric value indicated one of 4 wysiwyg editors shipped in core, and no value indicated 'Textarea'
// Now the options are "Textarea", "CKEditor", and the rest have been dropped from core.
$newEditor = $editorID ? "CKEditor" : "Textarea";
* @return object
*/
public static function eventPriceSetDomainID() {
- return CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
- 'event_price_set_domain_id',
- NULL, FALSE
- );
+ return Civi::settings()->get('event_price_set_domain_id');
}
/**
static $config = NULL;
if (!$format) {
- $format = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'address_format');
+ $format = Civi::settings()->get('address_format');
}
if ($mailing) {
- $format = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'mailing_format');
+ $format = Civi::settings()->get('mailing_format');
}
$formatted = $format;
return FALSE;
}
- $userID = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::ADDRESS_STANDARDIZATION_PREFERENCES_NAME,
- 'address_standardization_userid'
- );
- $url = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::ADDRESS_STANDARDIZATION_PREFERENCES_NAME,
- 'address_standardization_url'
- );
+ $userID = Civi::settings()->get('address_standardization_userid');
+ $url = Civi::settings()->get('address_standardization_url');
if (empty($userID) ||
empty($url)
public function checkOutboundMail() {
$messages = array();
- $mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME, 'mailing_backend');
+ $mailingInfo = Civi::settings()->get('mailing_backend');
if (($mailingInfo['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_REDIRECT_TO_DB
|| (defined('CIVICRM_MAIL_LOG') && CIVICRM_MAIL_LOG)
|| $mailingInfo['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_DISABLED
static $days = array();
if (!$days) {
// First day of the week
- $firstDay = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, 'weekBegins', NULL, 0);
+ $firstDay = Civi::settings()->get('weekBegins');
// set LC_TIME and build the arrays from locale-provided names
// June 1st, 1970 was a Monday
static $days = array();
if (!$days) {
// First day of the week
- $firstDay = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, 'weekBegins', NULL, 0);
+ $firstDay = Civi::settings()->get('weekBegins');
// set LC_TIME and build the arrays from locale-provided names
// June 1st, 1970 was a Monday
break;
case 'week':
- $weekFirst = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, 'weekBegins', NULL, 0);
+ $weekFirst = Civi::settings()->get('weekBegins');
$thisDay = $now['wday'];
if ($weekFirst > $thisDay) {
$diffDay = $thisDay - $weekFirst + 7;
*/
protected function createCurl($remoteFile) {
$caConfig = CA_Config_Curl::probe(array(
- 'verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'),
+ 'verify_peer' => (bool) Civi::settings()->get('verifySSL'),
));
$ch = curl_init();
* @return Mail
*/
public static function createMailer() {
- $mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'mailing_backend'
- );
+ $mailingInfo = Civi::settings()->get('mailing_backend');
if ($mailingInfo['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_REDIRECT_TO_DB ||
(defined('CIVICRM_MAILER_SPOOL') && CIVICRM_MAILER_SPOOL)
* TRUE if valid outBound email configuration found, false otherwise.
*/
public static function validOutBoundMail() {
- $mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
- 'mailing_backend'
- );
+ $mailingInfo = Civi::settings()->get('mailing_backend');
if ($mailingInfo['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_MAIL) {
return TRUE;
}
// Check to see if we have any additional fonts to add. You can specify more fonts in
// civicrm.settings.php via: $config['CiviCRM Preferences']['additional_fonts']
// CRM-13307
- $additionalFonts = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'additional_fonts');
+ $additionalFonts = Civi::settings()->get('additional_fonts');
if (is_array($additionalFonts)) {
$fontLabel = array_merge($fontLabel, $additionalFonts);
}
*/
public static function singleton($fresh = FALSE) {
if ($fresh || self::$singleton === NULL) {
- $mode = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME, 'fts_query_mode', NULL, self::MODE_NONE);
+ $mode = Civi::settings()->get('fts_query_mode');
self::$singleton = new CRM_Utils_QueryFormatter($mode);
}
return self::$singleton;
}
/**
- * @var string
+ * @var string
* eg MODE_NONE
*/
protected $mode;
$config = CRM_Core_Config::singleton();
$req_headers = self::getRequestHeaders();
// FIXME: Shouldn't the X-Forwarded-Proto check be part of CRM_Utils_System::isSSL()?
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enableSSL') &&
+ if (Civi::settings()->get('enableSSL') &&
!self::isSSL() &&
strtolower(CRM_Utils_Array::value('X_FORWARDED_PROTO', $req_headers)) != 'https'
) {
* @return string
*/
public static function getSiteID() {
- $sid = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'site_id');
+ $sid = Civi::settings()->get('site_id');
if (!$sid) {
$config = CRM_Core_Config::singleton();
$sid = md5('sid_' . (defined('CIVICRM_SITE_KEY') ? CIVICRM_SITE_KEY : '') . '_' . $config->userFrameworkBaseURL);
if (!$cmsRootPath) {
CRM_Core_Error::fatal("Could not find the install directory for WordPress");
}
- $path = CRM_Core_BAO_Setting::getItem('CiviCRM Preferences', 'wpLoadPhp');
+ $path = Civi::settings()->get('wpLoadPhp');
if (!empty($path)) {
require_once $path;
}
$this->localMajorVersion = $this->getMajorVersion($this->localVersion);
}
// Populate $versionInfo
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'versionCheck', NULL, 1)) {
+ if (Civi::settings()->get('versionCheck')) {
// Use cached data if available and not stale
if (!$this->readCacheFile()) {
// Collect stats for pingback
'description' => "WRITE ME",
'help_text' => 'WRITE ME',
),
+ 'show_events' => array(
+ 'name' => 'show_events',
+ 'group_name' => 'Event Preferences',
+ 'group' => 'event',
+ 'type' => 'Integer',
+ 'quick_form_type' => 'Element',
+ 'default' => 10,
+ 'add' => '4.5',
+ 'title' => 'Dashboard entries',
+ 'html_type' => 'select',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => "Configure how many events should be shown on the dashboard. This overrides the default value of 10 entries.",
+ 'help_text' => NULL,
+ ),
);