get correct article timestamp for feeds with no 'published' and with non-utc stamps
This commit is contained in:
parent
8c5c07b265
commit
6a4ae2e845
1 changed files with 5 additions and 3 deletions
|
@ -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');
|
||||||
|
|
Loading…
Reference in a new issue