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 eca60d0 commit cbf5a1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contao/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function generateFeed($intId)
$objCalendar->feedName = strlen($objCalendar->alias) ? $objCalendar->alias : 'calendar' . $objCalendar->id;

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

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

0 comments on commit cbf5a1b

Please sign in to comment.