[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:
Pierre Mazière 2016-09-14 13:36:44 +02:00
parent 8f58c9f86b
commit 2744c13735

View file

@ -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)){