From: syrnon Date: Tue, 9 Jul 2013 14:29:25 +0000 (+0300) Subject: calculating base locally X-Git-Tag: 1.9~44^2~2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b28b2ce9eb4265b7360f170ae7f706906fc6d1f9;p=tt-rss.git calculating base locally --- diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php index c58d2a5f..522ca633 100644 --- a/classes/feeditem/atom.php +++ b/classes/feeditem/atom.php @@ -1,13 +1,6 @@ baseUrl= $baseUrl; - } - function get_id() { $id = $this->elem->getElementsByTagName("id")->item(0); @@ -46,8 +39,8 @@ class FeedItem_Atom extends FeedItem_Common { (!$link->hasAttribute("rel") || $link->getAttribute("rel") == "alternate" || $link->getAttribute("rel") == "standout")) { - - return $this->baseUrl.$link->getAttribute("href"); + $base = $this->xpath->evaluate("string(ancestor-or-self::*[@xml:base][1]/@xml:base)",$link); + return $base.$link->getAttribute("href"); } } }