Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into contao413
Browse files Browse the repository at this point in the history
  • Loading branch information
hschottm committed Jul 22, 2022
2 parents 699d8e1 + 9930561 commit 21b1daa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions classes/TagHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,22 @@ public function replaceTagInsertTags($strTag)
$target = (count($elements) > 4) ? $elements[4] : 0;
switch ($elements[0])
{
case 'tags_used':
$headlinetags = array();
$relatedlist = (strlen(\TagHelper::decode(\Input::get('related')))) ? preg_split("/,/", \TagHelper::decode(\Input::get('related'))) : array();
if (strlen(\TagHelper::decode(\Input::get('tag'))))
{
$headlinetags = array_merge($headlinetags, array($this->Input->get('tag')));
if (count($relatedlist))
{
$headlinetags = array_merge($headlinetags, $relatedlist);
}
}
if (count($headlinetags))
{
return $elements[1];
}
break;
case 'tags_news':
return $this->getTagsForTableAndId('tl_news', $elements[1], false, $max_tags, $relevance, $target);
break;
Expand Down

0 comments on commit 21b1daa

Please sign in to comment.