Merge pull request #3024 from wallabag/store-date

Added publication date and author
This commit is contained in:
Nicolas Lœuillet
2017-04-18 13:12:28 +02:00
committed by GitHub
23 changed files with 243 additions and 17 deletions

View File

@ -79,6 +79,14 @@ class ContentProxy
$entry->setContent($html);
$entry->setHttpStatus(isset($content['status']) ? $content['status'] : '');
if (isset($content['date']) && null !== $content['date'] && '' !== $content['date']) {
$entry->setPublishedAt(new \DateTime($content['date']));
}
if (!empty($content['authors'])) {
$entry->setPublishedBy($content['authors']);
}
$entry->setLanguage(isset($content['language']) ? $content['language'] : '');
$entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : '');
$entry->setReadingTime(Utils::getReadingTime($html));