+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019 |
+ | Copyright CiviCRM LLC (c) 2004-2020 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2019
+ * @copyright CiviCRM LLC (c) 2004-2020
*/
/**
if ($config->userFrameworkFrontend) {
$script = 'index.php';
- if (JRequest::getVar("Itemid") && (strpos($path, 'civicrm/payment/ipn') === FALSE)) {
- $Itemid = "{$separator}Itemid=" . JRequest::getVar("Itemid");
+
+ // Get Itemid using JInput::get()
+ $input = Joomla\CMS\Factory::getApplication()->input;
+ $itemIdNum = $input->get("Itemid");
+ if ($itemIdNum && (strpos($path, 'civicrm/payment/ipn') === FALSE)) {
+ $Itemid = "{$separator}Itemid=" . $itemIdNum;
}
}
/**
* FIXME: Use CMS-native approach
+ * @throws \CRM_Core_Exception.
*/
public function permissionDenied() {
- CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
+ throw new CRM_Core_Exception(ts('You do not have permission to access this page.'));
}
/**