From b3ea83fe9650e305244c10c80cfccc56b859dab8 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 25 Mar 2013 21:29:55 -0400 Subject: [PATCH] Add support for RSS 0.91 and 0.92 --- miniflux/vendor/PicoFeed/Parser.php | 16 +++++++++++++++- miniflux/vendor/PicoFeed/Reader.php | 8 ++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/miniflux/vendor/PicoFeed/Parser.php b/miniflux/vendor/PicoFeed/Parser.php index 9522436..6612ebf 100644 --- a/miniflux/vendor/PicoFeed/Parser.php +++ b/miniflux/vendor/PicoFeed/Parser.php @@ -134,7 +134,15 @@ class Rss20 extends Parser $this->url = (string) $xml->channel->link; $this->id = $this->url; $this->updated = isset($xml->channel->pubDate) ? (string) $xml->channel->pubDate : (string) $xml->channel->lastBuildDate; - $this->updated = strtotime($this->updated); + + if ($this->updated) { + + $this->updated = strtotime($this->updated); + } + else { + + $this->updated = time(); + } foreach ($xml->channel->item as $entry) { @@ -273,3 +281,9 @@ class Rss10 extends Parser return $this; } } + + +class Rss92 extends Rss20 {} + + +class Rss91 extends Rss20 {} diff --git a/miniflux/vendor/PicoFeed/Reader.php b/miniflux/vendor/PicoFeed/Reader.php index cee50e1..e82705f 100644 --- a/miniflux/vendor/PicoFeed/Reader.php +++ b/miniflux/vendor/PicoFeed/Reader.php @@ -75,6 +75,14 @@ class Reader return new Rss20($this->content); } + else if (strpos($first_tag, 'content); + } + else if (strpos($first_tag, 'content); + } else if (strpos($first_tag, 'content);