]> git.wh0rd.org Git - tt-rss.git/commitdiff
Update feedparser.php
authorsyrnon <yossisr@outlook.com>
Wed, 3 Jul 2013 19:35:38 +0000 (22:35 +0300)
committersyrnon <yossisr@outlook.com>
Wed, 3 Jul 2013 19:35:38 +0000 (22:35 +0300)
classes/feedparser.php

index eb8606de912339a5c8ad8d3f9cc278c830b06373..1474c66bf0f7ae8e35163d1e08733e95f2ae6fc1 100644 (file)
@@ -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);