From f39bb8547cd3f3dc885a6c72565bc699e21ee168 Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Thu, 29 Sep 2016 17:53:25 +0530 Subject: [PATCH] Additional fix for Joomla --- CRM/Core/Payment.php | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.25.1