Skip to content

Commit

Permalink
Fix reader modules when auto_item is empty (see #5436)
Browse files Browse the repository at this point in the history
Description
-----------

-

Commits
-------

ed00211 fix reader modules when auto_item is empty
  • Loading branch information
fritzmg committed Oct 27, 2022
1 parent 968f5d7 commit 0b96823
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions calendar-bundle/contao/modules/ModuleEventReader.php
Expand Up @@ -54,6 +54,12 @@ public function generate()
return $objTemplate->parse();
}

// Return an empty string if "auto_item" is not set to combine list and reader on same page
if (Input::get('auto_item') === null)
{
return '';
}

$this->cal_calendar = $this->sortOutProtected(StringUtil::deserialize($this->cal_calendar));

if (empty($this->cal_calendar) || !\is_array($this->cal_calendar))
Expand Down
6 changes: 6 additions & 0 deletions faq-bundle/contao/modules/ModuleFaqReader.php
Expand Up @@ -50,6 +50,12 @@ public function generate()
return $objTemplate->parse();
}

// Return an empty string if "auto_item" is not set to combine list and reader on same page
if (Input::get('auto_item') === null)
{
return '';
}

$this->faq_categories = StringUtil::deserialize($this->faq_categories);

if (empty($this->faq_categories) || !\is_array($this->faq_categories))
Expand Down
6 changes: 6 additions & 0 deletions news-bundle/contao/modules/ModuleNewsReader.php
Expand Up @@ -53,6 +53,12 @@ public function generate()
return $objTemplate->parse();
}

// Return an empty string if "auto_item" is not set to combine list and reader on same page
if (Input::get('auto_item') === null)
{
return '';
}

$this->news_archives = $this->sortOutProtected(StringUtil::deserialize($this->news_archives));

if (empty($this->news_archives) || !\is_array($this->news_archives))
Expand Down
6 changes: 6 additions & 0 deletions newsletter-bundle/contao/modules/ModuleNewsletterReader.php
Expand Up @@ -48,6 +48,12 @@ public function generate()
return $objTemplate->parse();
}

// Return an empty string if "auto_item" is not set to combine list and reader on same page
if (Input::get('auto_item') === null)
{
return '';
}

$this->nl_channels = StringUtil::deserialize($this->nl_channels);

if (empty($this->nl_channels) || !\is_array($this->nl_channels))
Expand Down

0 comments on commit 0b96823

Please sign in to comment.