From deeeee76d2a85314ddab909f160574d0c7a5964d Mon Sep 17 00:00:00 2001 From: syrnon Date: Wed, 3 Jul 2013 22:35:38 +0300 Subject: [PATCH] Update feedparser.php --- classes/feedparser.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/classes/feedparser.php b/classes/feedparser.php index eb8606de9..1474c66bf 100644 --- a/classes/feedparser.php +++ b/classes/feedparser.php @@ -103,9 +103,18 @@ class FeedParser { if (!$articles || $articles->length == 0) $articles = $xpath->query("//atom03:entry"); - foreach ($articles as $article) { - array_push($this->items, new FeedItem_Atom($article, $this->doc, $this->xpath)); + $feed = $this->xpath->query("//atom:feed")->item(0); + $atts = $feed->attributes; + foreach($atts as $attrib) + { + if($attrib->name == "base"){ + $base = $attrib->nodeValue; + } } + foreach ($articles as $article) { + array_push($this->items, new FeedItem_Atom($article, $this->doc, $this->xpath, $base)); + } + break; case $this::FEED_RSS: