]> git.wh0rd.org - tt-rss.git/commitdiff
fix get_links() for RSS
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 1 May 2013 15:09:07 +0000 (19:09 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 1 May 2013 15:09:07 +0000 (19:09 +0400)
classes/feedparser.php

index 6d3a15802633e957b6ca1ed1dd416d7f691691bf..f127ba73d9596e8dbb775e02c5fdd8256fd625df 100644 (file)
@@ -132,8 +132,10 @@ class FeedParser {
                        break;
                case $this::FEED_RSS:
                        $links = $this->xpath->query("//channel/link");
-                       if (!$rel || $link->hasAttribute('rel') && $link->getAttribute('rel') == $rel) {
-                               array_push($rv, $link->getAttribute('href'));
+                       foreach ($links as $link) {
+                               if (!$rel || $link->hasAttribute('rel') && $link->getAttribute('rel') == $rel) {
+                                       array_push($rv, $link->getAttribute('href'));
+                               }
                        }
                        break;
                }