Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] wrong link when tag is in a menu #6291

Merged
merged 2 commits into from
Mar 7, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[fix] itemids overwritten if tag is in 2 menus
  • Loading branch information
phproberto committed Mar 7, 2015
commit 08195588c4809ae6b3c42abba6e1f2c7e40e1051
5 changes: 4 additions & 1 deletion components/com_tags/helpers/route.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ protected static function _findItem($needles = null)
{
foreach ($item->query['id'] as $position => $tagId)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think $item->query['id'][$position] in these lines of code could be changed to $tagId.

self::$lookup[$lang][$view][$item->query['id'][$position]] = $item->id;
if (!isset(self::$lookup[$lang][$view][$item->query['id'][$position]]) || count($item->query['id']) == 1)
{
self::$lookup[$lang][$view][$item->query['id'][$position]] = $item->id;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/com_tags/router.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function build(&$query)
return $segments;
}

if (isset($view) && $view == 'tag')
if ($view == 'tag')
{
$notActiveTag = is_array($mId) ? (count($mId) > 1 || $mId[0] != (int) $query['id']) : ($mId != (int) $query['id']);

Expand Down