Browse Source

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

pull/1/head
Friendika 11 years ago
parent
commit
6a4ae2e845
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      include/items.php

+ 5
- 3
include/items.php View File

@ -455,14 +455,16 @@ function get_atom_elements($feed,$item) {
$rawedited = $item->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10,'updated');
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'])
$res['created'] = $item->get_date();
$res['created'] = $item->get_date('c');
if(! $res['edited'])
$res['edited'] = $item->get_date();
$res['edited'] = $item->get_date('c');
$rawowner = $item->get_item_tags(NAMESPACE_DFRN, 'owner');


Loading…
Cancel
Save