Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Do not generate RSS feeds of protected archives/calendars (#2699)
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Feb 24, 2011
1 parent e77a564 commit ec4fccb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Resources/contao/News.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function generateFeed($intId)
$objArchive->feedName = strlen($objArchive->alias) ? $objArchive->alias : 'news' . $objArchive->id;

// Delete XML file
if ($this->Input->get('act') == 'delete')
if ($this->Input->get('act') == 'delete' || $objArchive->protected)
{
$this->import('Files');
$this->Files->delete($objArchive->feedName . '.xml');
Expand All @@ -79,7 +79,7 @@ public function generateFeed($intId)
public function generateFeeds()
{
$this->removeOldFeeds();
$objArchive = $this->Database->execute("SELECT * FROM tl_news_archive WHERE makeFeed=1");
$objArchive = $this->Database->execute("SELECT * FROM tl_news_archive WHERE makeFeed=1 AND protected!=1");

while ($objArchive->next())
{
Expand Down

0 comments on commit ec4fccb

Please sign in to comment.