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 576a999 commit 65d6fff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Version 2.9.4 (2011-XX-XX)
- Fixed: textual publication dates in RSS feeds were not translated (#2760)
- Fixed: the description of the newsletter offset was wrong (#2824)
- Fixed: remove insert tags in page names from title attributes (#2853)
- Fixed: do not generate RSS feeds of protected archives/calendars (#2699)
- Fixed some minor issues

Version 2.9.3 (2011-01-06)
Expand Down
4 changes: 2 additions & 2 deletions system/modules/calendar/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
4 changes: 2 additions & 2 deletions system/modules/news/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 65d6fff

Please sign in to comment.