Change Rss 2.0 item id generation
This commit is contained in:
parent
76bc123062
commit
ee17f9dad6
10
vendor/PicoFeed/Parsers/Rss20.php
vendored
10
vendor/PicoFeed/Parsers/Rss20.php
vendored
@ -218,12 +218,7 @@ class Rss20 extends Parser
|
||||
*/
|
||||
public function findItemId(SimpleXMLElement $entry, Item $item, Feed $feed)
|
||||
{
|
||||
if ($entry->guid->count() > 0 && (string) $entry->guid['isPermaLink'] !== 'false') {
|
||||
$item_permalink = (string) $entry->guid;
|
||||
}
|
||||
else {
|
||||
$item_permalink = $item->url;
|
||||
}
|
||||
|
||||
if ($this->isExcludedFromId($feed->url)) {
|
||||
$feed_permalink = '';
|
||||
@ -232,8 +227,13 @@ class Rss20 extends Parser
|
||||
$feed_permalink = $feed->url;
|
||||
}
|
||||
|
||||
if ($entry->guid->count() > 0 && (string) $entry->guid['isPermaLink'] === 'false') {
|
||||
$item->id = $this->generateId($item_permalink, $feed_permalink, (string) $entry->guid);
|
||||
}
|
||||
else {
|
||||
$item->id = $this->generateId($item_permalink, $feed_permalink);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the item enclosure
|
||||
|
Loading…
Reference in New Issue
Block a user