]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #5699 from annando/issue-5691
authorHypolite Petovan <mrpetovan@eml.cc>
Wed, 29 Aug 2018 20:08:54 +0000 (16:08 -0400)
committerGitHub <noreply@github.com>
Wed, 29 Aug 2018 20:08:54 +0000 (16:08 -0400)
Issue 5691: Post dates of feeds sometimes had been wrong

src/Protocol/Feed.php

index c9c750a83fdfdb57e7f1953c26c9072de1f44bad..0709a9550ea23b44c20468930c1d30369f1b65ea 100644 (file)
@@ -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;
                        }