summaryrefslogtreecommitdiff
path: root/classes/feedparser.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-05-01 19:09:07 +0400
committerAndrew Dolgov <[email protected]>2013-05-01 19:09:07 +0400
commit3c8060aca07af57f97885466a369afdf4c2d79d5 (patch)
tree8d5463f598125123653d9d94754471166915df5b /classes/feedparser.php
parentb9eee80e08fab8ebcc1484e8d62cd646ac451f43 (diff)
fix get_links() for RSS
Diffstat (limited to 'classes/feedparser.php')
-rw-r--r--classes/feedparser.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/feedparser.php b/classes/feedparser.php
index 6d3a15802..f127ba73d 100644
--- a/classes/feedparser.php
+++ b/classes/feedparser.php
@@ -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;
}