]> git.wh0rd.org Git - tt-rss.git/commitdiff
Update atom.php
authorsyrnon <yossisr@outlook.com>
Wed, 3 Jul 2013 19:36:33 +0000 (22:36 +0300)
committersyrnon <yossisr@outlook.com>
Wed, 3 Jul 2013 19:36:33 +0000 (22:36 +0300)
classes/feeditem/atom.php

index fa6b3a34c39ba27f70c74d7cd1288625491370f8..c58d2a5ff43f586f8ce21a565936bcc8a32da965 100644 (file)
@@ -1,5 +1,13 @@
 <?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);
 
@@ -39,7 +47,7 @@ class FeedItem_Atom extends FeedItem_Common {
                                        || $link->getAttribute("rel") == "alternate"
                                        || $link->getAttribute("rel") == "standout")) {
 
-                               return $link->getAttribute("href");
+                               return $this->baseUrl.$link->getAttribute("href");
                        }
                }
        }