Skip to content

Commit

Permalink
Multilingual: correcting alternates when associated menu items are
Browse files Browse the repository at this point in the history
com_users items
  • Loading branch information
infograf768 committed Dec 10, 2016
1 parent 375897a commit 54a1468
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion plugins/system/languagefilter/languagefilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,15 @@ public function onAfterDispatch()
// Heads up! "$item = $menu" here below is an assignment, *NOT* comparison
case (isset($associations[$i]) && ($item = $menu->getItem($associations[$i]))):

$language->link = JRoute::_($item->link . '&Itemid=' . $item->id . '&lang=' . $language->sef);
// Special case for com_users menu items
if (strpos($item->link, 'option=com_users'))
{
$language->link = JRoute::_('index.php?&Itemid=' . $item->id . '&lang=' . $language->sef);
}
else
{
$language->link = JRoute::_($item->link . '&Itemid=' . $item->id . '&lang=' . $language->sef);
}
break;

// Too bad...
Expand Down

0 comments on commit 54a1468

Please sign in to comment.