<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
if (!$values['event']['is_active']) {
// form is inactive, die a fatal death
- CRM_Core_Error::fatal(ts('The page you requested is currently unavailable.'));
+ CRM_Utils_System::setUFMessage(ts('The event you requested is currently unavailable (contact the site administrator for assistance).'));
+ return CRM_Utils_System::permissionDenied();
}
if (!empty($values['event']['is_template'])) {
$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);
//retrieve custom field information
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Event', $this, $this->_id, 0, $values['event']['event_type_id']);
- CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree);
+ CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $this->_id);
$this->assign('action', CRM_Core_Action::VIEW);
//To show the event location on maps directly on event info page
$locations = CRM_Event_BAO_Event::getMapInfo($this->_id);
}
// 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));
}