Skip to content

Commit

Permalink
Merge pull request #15132 from andrewpthompson/joomla4-frontend-compa…
Browse files Browse the repository at this point in the history
…tibility

(dev/joomla#22) Fix deprecated JRequest for Joomla 4.0
  • Loading branch information
seamuslee001 authored Sep 9, 2019
2 parents 171a505 + 92b78d1 commit 0d3542c
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 0d3542c

Please sign in to comment.