From: Michael Date: Wed, 29 Aug 2018 19:11:43 +0000 (+0000) Subject: Issue 5691: Post dates of feeds sometimes had been wrong X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9bff31f18f35acba405724f0dacdf20b0c6e8ba4;p=friendica.git Issue 5691: Post dates of feeds sometimes had been wrong --- diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index c9c750a83f..0709a9550e 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -271,9 +271,14 @@ class Feed { } $updated = XML::getFirstNodeValue($xpath, 'atom:updated/text()', $entry); - if (empty($updated)) { + if (empty($updated) && !empty($published)) { $updated = $published; } + + if (empty($published) && !empty($updated)) { + $published = $updated; + } + if ($published != "") { $item["created"] = $published; }