diff --git a/modules/ModuleEventlistTags.php b/modules/ModuleEventlistTags.php index 9088e79..89b1f81 100644 --- a/modules/ModuleEventlistTags.php +++ b/modules/ModuleEventlistTags.php @@ -415,6 +415,31 @@ protected function compile() ////////// 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(); + } + } + } ?> \ No newline at end of file