diff options
author | syrnon <[email protected]> | 2013-07-09 17:29:25 +0300 |
---|---|---|
committer | syrnon <[email protected]> | 2013-07-09 17:29:25 +0300 |
commit | b28b2ce9eb4265b7360f170ae7f706906fc6d1f9 (patch) | |
tree | 0962f6e8f7dd7e51789431ac435a65b14184b024 /classes/feeditem/atom.php | |
parent | f150f85a5e3694dd9af195afdb154807c58a7630 (diff) |
calculating base locally
Diffstat (limited to 'classes/feeditem/atom.php')
-rw-r--r-- | classes/feeditem/atom.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php index c58d2a5ff..522ca633e 100644 --- a/classes/feeditem/atom.php +++ b/classes/feeditem/atom.php @@ -1,13 +1,6 @@ <?php class FeedItem_Atom extends FeedItem_Common { - private $baseUrl; - - function __construct($elem, $doc, $xpath, $baseUrl) { - parent::__construct($elem, $doc, $xpath); - $this->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"); } } } |