From 042003d55e4f77382ca6f312b4d27533aa5dbc75 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 20 May 2013 15:01:18 +0400 Subject: [PATCH] parser/rss: try to get link from guid isPermaLink=true --- classes/feeditem/rss.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/classes/feeditem/rss.php b/classes/feeditem/rss.php index 2c29e318..34dfee1f 100644 --- a/classes/feeditem/rss.php +++ b/classes/feeditem/rss.php @@ -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) { -- 2.39.5