Merge pull request #5699 from annando/issue-5691

Issue 5691: Post dates of feeds sometimes had been wrong
This commit is contained in:
Hypolite Petovan 2018-08-29 16:08:54 -04:00 committed by GitHub
commit dfbac99aa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View 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;
}