Skip to content

Commit 5a1a11f

Browse files
IgorA100Grotax
authored andcommitted
[5.3] If "Link" does not exist, then set it based on "guid"
Example: https://k47.cz/rss.xml
1 parent 02fbc34 commit 5a1a11f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/FeedIo/Rule/PublicId.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ class PublicId extends RuleAbstract
1818
public function setProperty(NodeInterface $node, \DOMElement $element): void
1919
{
2020
$node->setPublicId($element->nodeValue);
21+
if ($element->nodeName == 'guid'
22+
&& $element->getAttribute('isPermaLink') === 'true'
23+
&& is_null($node->getLink())) {
24+
$node->setLink($element->nodeValue);
25+
}
2126
}
2227

2328
/**

0 commit comments

Comments
 (0)