From: deb.monish Date: Thu, 29 Sep 2016 12:23:25 +0000 (+0530) Subject: Additional fix for Joomla X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f39bb8547cd3f3dc885a6c72565bc699e21ee168;p=civicrm-core.git Additional fix for Joomla --- diff --git a/CRM/Core/Payment.php b/CRM/Core/Payment.php index bb4e62a906..cc53caf3a7 100644 --- a/CRM/Core/Payment.php +++ b/CRM/Core/Payment.php @@ -1144,6 +1144,7 @@ abstract class CRM_Core_Payment { 'processor_id' => @$_GET['processor_id'], 'mode' => @$_GET['mode'], 'q' => @$_GET['q'], + 'task' => @$_GET['task'], // for Joomla ) ); CRM_Utils_System::civiExit(); @@ -1169,6 +1170,11 @@ abstract class CRM_Core_Payment { public static function handlePaymentMethod($method, $params = array()) { if (!isset($params['processor_id']) && !isset($params['processor_name'])) { $q = explode('/', CRM_Utils_Array::value('q', $params, '')); + + if (CRM_Core_Config::singleton()->userFramework == 'Joomla' && !empty($params['task'])) { + $q = explode('/', CRM_Utils_Array::value('path', parse_url($params['task']), '')); + } + $lastParam = array_pop($q); if (is_numeric($lastParam)) { $params['processor_id'] = $_GET['processor_id'] = $lastParam;