Skip to content
Snippets Groups Projects
Commit e55a5ec6 authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

atom: consider link rel=alternate in feed element for site urls

parent 6d204cd1
No related branches found
No related tags found
No related merge requests found
...@@ -141,9 +141,14 @@ class FeedParser { ...@@ -141,9 +141,14 @@ class FeedParser {
$link = $xpath->query("//atom:feed/atom:link[not(@rel)]")->item(0); $link = $xpath->query("//atom:feed/atom:link[not(@rel)]")->item(0);
if (!$link)
$link = $xpath->query("//atom:feed/atom:link[@rel='alternate']")->item(0);
if (!$link) if (!$link)
$link = $xpath->query("//atom03:feed/atom03:link[not(@rel)]")->item(0); $link = $xpath->query("//atom03:feed/atom03:link[not(@rel)]")->item(0);
if (!$link)
$link = $xpath->query("//atom03:feed/atom03:link[@rel='alternate']")->item(0);
if ($link && $link->hasAttributes()) { if ($link && $link->hasAttributes()) {
$this->link = $link->getAttribute("href"); $this->link = $link->getAttribute("href");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment