1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Added author of article

This commit is contained in:
Nicolas Lœuillet 2017-04-06 09:36:20 +02:00
parent 5e9009ce86
commit 7b0b3622ab
20 changed files with 79 additions and 6 deletions

View file

@ -79,10 +79,14 @@ class ContentProxy
$entry->setContent($html);
$entry->setHttpStatus(isset($content['status']) ? $content['status'] : '');
if (isset($content['date']) && null !== $content['date']) {
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));