Update feedparser.php

master
syrnon 12 years ago
parent 776b19536d
commit deeeee76d2

@ -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);

Loading…
Cancel
Save