Skip to content

Commit

Permalink
Removed unused function with wrong syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
hschottm committed Mar 7, 2023
1 parent 718d810 commit 5abd8a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 26 deletions.
25 changes: 1 addition & 24 deletions elements/ContentGalleryTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -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+
*/
Expand Down Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion modules/ModuleEventReaderTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ protected function compile()
}

$arrEvent['singleSRC'] = $objModel->path;
$this->addImageToTemplate($objTemplate, $arrEvent, null, null);
$this->addImageToTemplate($objTemplate, $arrEvent, null, null, $objModel);
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/ModuleEventlistTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5abd8a4

Please sign in to comment.