mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-23 10:05:32 +03:00
[FeedExpander] fix feeds using guid tag as item uri provider
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
8f58c9f86b
commit
2744c13735
1 changed files with 9 additions and 0 deletions
|
@ -151,6 +151,15 @@ abstract class FeedExpander extends BridgeAbstract {
|
|||
$namespaces = $feedItem->getNamespaces(true);
|
||||
if(isset($namespaces['dc'])) $dc = $feedItem->children($namespaces['dc']);
|
||||
|
||||
if(isset($feedItem->guid)){
|
||||
foreach($feedItem->guid->attributes() as $attribute=>$value){
|
||||
if($attribute === 'isPermaLink' && $value === "true"){
|
||||
$item['uri'] = $feedItem->guid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($feedItem->pubDate)){
|
||||
$item['timestamp'] = strtotime($feedItem->pubDate);
|
||||
} elseif(isset($dc->date)){
|
||||
|
|
Loading…
Reference in a new issue