Add ability to define created_at for all import

At the moment only Readability & wallabag v2 import allow created_at import.
Pocket removed `time_added` field from their API v2 to v3...
And wallabag v1 doesn't export that value.
This commit is contained in:
Jeremy Benoist
2016-09-09 09:36:07 +02:00
parent 3aca0a9f00
commit 6d65c0a8b0
8 changed files with 47 additions and 2 deletions

View File

@ -139,6 +139,10 @@ abstract class WallabagImport extends AbstractImport
$entry->setArchived($data['is_archived']);
$entry->setStarred($data['is_starred']);
if (!empty($data['created_at'])) {
$entry->setCreatedAt(new \DateTime($data['created_at']));
}
$this->em->persist($entry);
++$this->importedEntries;