Skip to content

Commit

Permalink
Fix deprecated JRequest for Joomla 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpthompson committed Aug 25, 2019
1 parent f9f4b9e commit 92b78d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CRM/Utils/System/Joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,12 @@ public function url(

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;
}
}

Expand Down

0 comments on commit 92b78d1

Please sign in to comment.