From: syrnon Date: Wed, 3 Jul 2013 19:35:38 +0000 (+0300) Subject: Update feedparser.php X-Git-Tag: 1.9~44^2~5 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=deeeee76d2a85314ddab909f160574d0c7a5964d;p=tt-rss.git Update feedparser.php --- diff --git a/classes/feedparser.php b/classes/feedparser.php index eb8606de..1474c66b 100644 --- a/classes/feedparser.php +++ b/classes/feedparser.php @@ -103,10 +103,19 @@ class FeedParser { if (!$articles || $articles->length == 0) $articles = $xpath->query("//atom03:entry"); + $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)); + array_push($this->items, new FeedItem_Atom($article, $this->doc, $this->xpath, $base)); } + break; case $this::FEED_RSS: $title = $xpath->query("//channel/title")->item(0);