Skip to content

Commit

Permalink
Fix frontend (sub)category filtering by language
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrezdev committed Jan 16, 2015
1 parent 44a1fc6 commit fab819d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions components/com_content/models/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,19 @@ public function getParent()
$this->getCategory();
}

// Filter Parent category by language
if ($this->getState('filter.language'))
{
if (in_array($this->_item->language, array(JFactory::getLanguage()->getTag(), '*')))
{
return $this->_parent;
}
else
{
return null;
}
}

return $this->_parent;
}

Expand Down

0 comments on commit fab819d

Please sign in to comment.