fix get_links() for RSS

This commit is contained in:
Andrew Dolgov 2013-05-01 19:09:07 +04:00
parent b9eee80e08
commit 3c8060aca0
1 changed files with 4 additions and 2 deletions

View 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;
}