]> git.mxchange.org Git - friendica.git/commitdiff
Issue 5691: Post dates of feeds sometimes had been wrong
authorMichael <heluecht@pirati.ca>
Wed, 29 Aug 2018 19:11:43 +0000 (19:11 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 29 Aug 2018 19:11:43 +0000 (19:11 +0000)
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;
                        }