From 5abd8a4cabb59cc4400f27f40f6fc8c242e34035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helmut=20Schottm=C3=BCller?= Date: Tue, 7 Mar 2023 13:42:33 +0100 Subject: [PATCH] Removed unused function with wrong syntax --- elements/ContentGalleryTags.php | 25 +------------------------ modules/ModuleEventReaderTags.php | 2 +- modules/ModuleEventlistTags.php | 2 +- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/elements/ContentGalleryTags.php b/elements/ContentGalleryTags.php index 8b90ca9..fc34baa 100644 --- a/elements/ContentGalleryTags.php +++ b/elements/ContentGalleryTags.php @@ -5,7 +5,7 @@ /** * Contao Open Source CMS - tags extension * - * Copyright (c) 2008-2016 Helmut Schottmüller + * Copyright (c) 2008-2023 Helmut Schottmüller * * @license LGPL-3.0+ */ @@ -69,29 +69,6 @@ public function compile() parent::compile(); } - /** - * Add an image to a template - * - * @param object $objTemplate The template object to add the image to - * @param array $arrItem The element or module as array - * @param integer $intMaxWidth An optional maximum width of the image - * @param string $strLightboxId An optional lightbox ID - */ - public static function addImageToTemplate($objTemplate, $arrItem, $intMaxWidth=null, $strLightboxId=null) - { - Controller::addImageToTemplate($objTemplate, $arrItem, $intMaxWidth, $strLightboxId); - if (TL_MODE == 'FE') { - $found = \TagModel::findByIdAndTable($arrItem['id'], 'tl_files'); - $tags = array(); - if ($found && $found->count()) { - while ($found->next()) { - array_push($tags, $found->tag); - } - $template->tags = $tags; - } - } - } - protected function getFilterTags() { if (strlen($this->tag_filter)) { diff --git a/modules/ModuleEventReaderTags.php b/modules/ModuleEventReaderTags.php index f2c1cf8..584a131 100644 --- a/modules/ModuleEventReaderTags.php +++ b/modules/ModuleEventReaderTags.php @@ -279,7 +279,7 @@ protected function compile() } $arrEvent['singleSRC'] = $objModel->path; - $this->addImageToTemplate($objTemplate, $arrEvent, null, null); + $this->addImageToTemplate($objTemplate, $arrEvent, null, null, $objModel); } } diff --git a/modules/ModuleEventlistTags.php b/modules/ModuleEventlistTags.php index a285a8b..cee921f 100644 --- a/modules/ModuleEventlistTags.php +++ b/modules/ModuleEventlistTags.php @@ -354,7 +354,7 @@ protected function compile() } $event['singleSRC'] = $objModel->path; - $this->addImageToTemplate($objTemplate, $event, null, null); + $this->addImageToTemplate($objTemplate, $event, null, null, $objModel); // Link to the event if no image link has been defined if (!$objTemplate->fullsize && !$objTemplate->imageUrl)