]> git.wh0rd.org - tt-rss.git/commitdiff
fix atom:link not supported in rss feeds (fucking fuck) (2)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 17 May 2013 18:57:18 +0000 (22:57 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 17 May 2013 18:57:18 +0000 (22:57 +0400)
classes/feeditem/rss.php

index 93aa5ea8af0338288ec98da6345023e1ddaee21d..2c29e318f1b34a537dba4025befdd887e4a7d0e4 100644 (file)
@@ -19,18 +19,17 @@ class FeedItem_RSS extends FeedItem_Common {
        }
 
        function get_link() {
-               $link = $this->elem->getElementsByTagName("link")->item(0);
+               $link = $this->xpath->query("atom:link", $this->elem)->item(0);
 
                if ($link) {
-                       return $link->nodeValue;
+                       return $link->getAttribute("href");
                }
 
-               $link = $this->xpath->query("atom:link", $this->elem)->item(0);
+               $link = $this->elem->getElementsByTagName("link")->item(0);
 
                if ($link) {
                        return $link->nodeValue;
                }
-
        }
 
        function get_title() {