<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 5 |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019 |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM. |
- | |
- | CiviCRM is free software; you can copy, modify, and distribute it |
- | under the terms of the GNU Affero General Public License |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
- | |
- | CiviCRM is distributed in the hope that it will be useful, but |
- | WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
- | See the GNU Affero General Public License for more details. |
+ | Copyright CiviCRM LLC. All rights reserved. |
| |
- | You should have received a copy of the GNU Affero General Public |
- | License and the CiviCRM Licensing Exception along |
- | with this program; if not, contact CiviCRM LLC |
- | at info[AT]civicrm[DOT]org. If you have questions about the |
- | GNU Affero General Public License or the licensing of CiviCRM, |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
+ | This work is published under the GNU AGPLv3 license with some |
+ | permitted exceptions and without any warranty. For full license |
+ | and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2019
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
*/
/**
//CRM-4418
if (!CRM_Core_Permission::checkActionPermission('CiviCase', $this->_action)) {
- CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
+ CRM_Core_Error::statusBounce(ts('You do not have permission to access this page.'));
}
if ($this->_action & CRM_Core_Action::DELETE || $this->_action & CRM_Core_Action::RENEW) {
foreach ($caseAttributes as $key => $label) {
if (!CRM_Case_BAO_Case::buildOptions($key, 'create')) {
- CRM_Core_Error::fatal(ts('You do not have any active %1', [1 => $label]));
+ CRM_Core_Error::statusBounce(ts('You do not have any active %1', [1 => $label]));
}
}
}
if ($this->_action & CRM_Core_Action::ADD) {
$this->_activityTypeId = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Open Case');
if (!$this->_activityTypeId) {
- CRM_Core_Error::fatal(ts('The Open Case activity type is missing or disabled. Please have your site administrator check Administer > Option Lists > Activity Types for the CiviCase component.'));
+ CRM_Core_Error::statusBounce(ts('The Open Case activity type is missing or disabled. Please have your site administrator check Administer > Option Lists > Activity Types for the CiviCase component.'));
}
}
//check for case permissions.
if (!CRM_Case_BAO_Case::accessCiviCase()) {
- CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
+ CRM_Core_Error::statusBounce(ts('You are not authorized to access this page.'));
}
if (($this->_action & CRM_Core_Action::ADD) &&
(!CRM_Core_Permission::check('access all cases and activities') &&
!CRM_Core_Permission::check('add cases')
)
) {
- CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
+ CRM_Core_Error::statusBounce(ts('You are not authorized to access this page.'));
}
if ($this->_activityTypeFile = CRM_Activity_BAO_Activity::getFileForActivityTypeId($this->_activityTypeId,