X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FHelper%2FContentProxy.php;h=d45aef8894d6d0fe154efc7fb6344e2840059a30;hb=cebed9c01f20d47cb60259f0c002ea57a80da4d0;hp=f222dd88c26fced386f0328d03105e9194e9812d;hpb=20da238413d1c6cc360d58a13df33eb199fa5f05;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index f222dd88..d45aef88 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -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));