From 9a2c16096e5a3d0d193f7bd139210df7dd38db2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helmut=20Schottm=C3=BCller?= Date: Fri, 8 Jan 2016 12:06:25 +0100 Subject: [PATCH] Added missing function which was accidentally removed with the last update --- modules/ModuleEventlistTags.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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