Skip to content

Commit

Permalink
Added missing function
Browse files Browse the repository at this point in the history
  • Loading branch information
hschottm committed Jul 28, 2017
1 parent fb5ab9e commit f673673
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions modules/ModuleEventlistTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,4 +403,30 @@ protected function compile()
$this->Template->tags_activetags = $headlinetags;
////////// CHANGES BY ModuleEventlistTags
}

/**
* Read tags from database
* @return string
*/
protected function getFilterTags()
{
if (strlen($this->tag_filter))
{
$tags = preg_split("/,/", $this->tag_filter);
$placeholders = array();
foreach ($tags as $tag)
{
array_push($placeholders, '?');
}
array_push($tags, 'tl_calendar_events');
return $this->Database->prepare("SELECT tid FROM tl_tag WHERE tag IN (" . join($placeholders, ',') . ") AND from_table = ? ORDER BY tag ASC")
->execute($tags)
->fetchEach('tid');
}
else
{
return array();
}
}

}

0 comments on commit f673673

Please sign in to comment.