]> git.wh0rd.org Git - tt-rss.git/commitdiff
parser/rss: try to get link from guid isPermaLink=true
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 20 May 2013 11:01:18 +0000 (15:01 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 20 May 2013 11:01:18 +0000 (15:01 +0400)
classes/feeditem/rss.php

index 2c29e318f1b34a537dba4025befdd887e4a7d0e4..34dfee1f14924dd6feed798f68ef705f53e3f6fc 100644 (file)
@@ -25,6 +25,12 @@ class FeedItem_RSS extends FeedItem_Common {
                        return $link->getAttribute("href");
                }
 
+               $link = $this->elem->getElementsByTagName("guid")->item(0);
+
+               if ($link && $link->hasAttributes() && $link->getAttribute("isPermaLink") == "true") {
+                       return $link->nodeValue;
+               }
+
                $link = $this->elem->getElementsByTagName("link")->item(0);
 
                if ($link) {