From f67367363683ce0adc0f7adcd4ce98f41922d3b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helmut=20Schottm=C3=BCller?= Date: Fri, 28 Jul 2017 22:54:46 +0200 Subject: [PATCH] Added missing function --- modules/ModuleEventlistTags.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/modules/ModuleEventlistTags.php b/modules/ModuleEventlistTags.php index 35c4e2c..af31060 100644 --- a/modules/ModuleEventlistTags.php +++ b/modules/ModuleEventlistTags.php @@ -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(); + } + } + }