summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorsyrnon <[email protected]>2013-07-03 22:35:38 +0300
committersyrnon <[email protected]>2013-07-03 22:35:38 +0300
commitdeeeee76d2a85314ddab909f160574d0c7a5964d (patch)
tree4201b0ca458d0ef0c12dd8132d7ef56725d569ff /classes
parent776b19536df2e01d8d5363c3a8647f3a24417b6b (diff)
Update feedparser.php
Diffstat (limited to 'classes')
-rw-r--r--classes/feedparser.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/classes/feedparser.php b/classes/feedparser.php
index eb8606de9..1474c66bf 100644
--- a/classes/feedparser.php
+++ b/classes/feedparser.php
@@ -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);