diff options
author | Andrew Dolgov <[email protected]> | 2013-05-20 15:01:18 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-05-20 15:01:18 +0400 |
commit | 042003d55e4f77382ca6f312b4d27533aa5dbc75 (patch) | |
tree | c3eb72dd0bbcd39471f681cd632aeea33b2091b9 /classes | |
parent | 8a50539c44a89636cc2a36c341822376193d1e14 (diff) |
parser/rss: try to get link from guid isPermaLink=true
Diffstat (limited to 'classes')
-rw-r--r-- | classes/feeditem/rss.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/classes/feeditem/rss.php b/classes/feeditem/rss.php index 2c29e318f..34dfee1f1 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) { |