- Patch #70725 by ahoeben: recognized more Atom dates.

5.x
Dries Buytaert 2006-06-25 15:26:41 +00:00
parent b859406290
commit 15b40d7ea5
2 changed files with 4 additions and 0 deletions

View File

@ -886,6 +886,8 @@ function aggregator_parse_feed(&$data, $feed) {
else if ($item['ISSUED']) $date = $item['ISSUED']; // Atom XML
else if ($item['CREATED']) $date = $item['CREATED']; // Atom XML
else if ($item['MODIFIED']) $date = $item['MODIFIED']; // Atom XML
else if ($item['PUBLISHED']) $date = $item['PUBLISHED']; // Atom XML
else if ($item['UPDATED']) $date = $item['UPDATED']; // Atom XML
else $date = 'now';
$timestamp = strtotime($date); // As of PHP 5.1.0, strtotime returns FALSE on failure instead of -1.

View File

@ -886,6 +886,8 @@ function aggregator_parse_feed(&$data, $feed) {
else if ($item['ISSUED']) $date = $item['ISSUED']; // Atom XML
else if ($item['CREATED']) $date = $item['CREATED']; // Atom XML
else if ($item['MODIFIED']) $date = $item['MODIFIED']; // Atom XML
else if ($item['PUBLISHED']) $date = $item['PUBLISHED']; // Atom XML
else if ($item['UPDATED']) $date = $item['UPDATED']; // Atom XML
else $date = 'now';
$timestamp = strtotime($date); // As of PHP 5.1.0, strtotime returns FALSE on failure instead of -1.