get correct article timestamp for feeds with no 'published' and with non-utc stamps

pull/1/head
Friendika 2011-02-01 16:50:19 -08:00
rodzic 8c5c07b265
commit 6a4ae2e845
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -455,14 +455,16 @@ function get_atom_elements($feed,$item) {
$rawedited = $item->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10,'updated'); $rawedited = $item->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10,'updated');
if($rawedited) if($rawedited)
$res['edited'] = unxmlify($rawcreated[0]['data']); $res['edited'] = unxmlify($rawedited[0]['data']);
if((x($res,'edited')) && (! (x($res,'created'))))
$res['created = $res['edited'];
if(! $res['created']) if(! $res['created'])
$res['created'] = $item->get_date(); $res['created'] = $item->get_date('c');
if(! $res['edited']) if(! $res['edited'])
$res['edited'] = $item->get_date(); $res['edited'] = $item->get_date('c');
$rawowner = $item->get_item_tags(NAMESPACE_DFRN, 'owner'); $rawowner = $item->get_item_tags(NAMESPACE_DFRN, 'owner');