1
0

pubdate/pubDate

This commit is contained in:
Garvin Hicking
2014-04-25 10:39:14 +02:00
parent 5e0c4c074e
commit c73f21ce0d
2 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,8 @@
Version 2.0-beta2 ()
------------------------------------------------------------------------
* RSS importer accepts pubDate in addition to pubdate element.
* Upgrader in Dashboard can be disabled, returns error message when
URL not accessible

View File

@ -94,6 +94,9 @@ class Serendipity_Import_Generic extends Serendipity_Import {
}
$entry['title'] = $this->decode($item['title']);
if (!isset($item['pubdate']) && isset($item['pubDate'])) {
$item['pubdate'] = $item['pubDate'];
}
$entry['timestamp'] = $this->decode(strtotime(isset($item['pubdate']) ? $item['pubdate'] : $item['dc:date']));
if ($entry['timestamp'] == -1) {
// strtotime does not seem to parse ISO 8601 dates