Skip to content

Commit

Permalink
try .atom in spout feed.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rontu85 committed Apr 10, 2013
1 parent 0e827df commit 6702c2d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ user.css
/_bin/*.*
/_docs/website/forum
config.ini
.project
11 changes: 10 additions & 1 deletion spouts/rss/feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,16 @@ public function load($params) {

// check for error
if(@$this->feed->error()) {
throw new \exception($this->feed->error());
// try .atom file format
@$this->feed->set_feed_url(htmlspecialchars_decode($params['url'] .'.atom'));
@$this->feed->init();

if(@$this->feed->error()) {
throw new \exception($this->feed->error());
} else {
// save fetched items
$this->items = @$this->feed->get_items();
}
} else {
// save fetched items
$this->items = @$this->feed->get_items();
Expand Down

0 comments on commit 6702c2d

Please sign in to comment.