diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-04-18 13:12:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-18 13:12:28 +0200 |
commit | 64f1d8f77a75332b731124c5ebab4bed7a512081 (patch) | |
tree | 41b087f24db4f4fce2e94a811d8554c91637d137 /src/Wallabag/CoreBundle/Helper | |
parent | c5ba478dc326ee43c5861fc170d1121b6224d847 (diff) | |
parent | e9c80c99bda57905e481dc7eb7748a3b5c0d9ac9 (diff) | |
download | wallabag-64f1d8f77a75332b731124c5ebab4bed7a512081.tar.gz wallabag-64f1d8f77a75332b731124c5ebab4bed7a512081.tar.zst wallabag-64f1d8f77a75332b731124c5ebab4bed7a512081.zip |
Merge pull request #3024 from wallabag/store-date
Added publication date and author
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/ContentProxy.php | 8 |
1 files changed, 8 insertions, 0 deletions
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 | |||
79 | $entry->setContent($html); | 79 | $entry->setContent($html); |
80 | $entry->setHttpStatus(isset($content['status']) ? $content['status'] : ''); | 80 | $entry->setHttpStatus(isset($content['status']) ? $content['status'] : ''); |
81 | 81 | ||
82 | if (isset($content['date']) && null !== $content['date'] && '' !== $content['date']) { | ||
83 | $entry->setPublishedAt(new \DateTime($content['date'])); | ||
84 | } | ||
85 | |||
86 | if (!empty($content['authors'])) { | ||
87 | $entry->setPublishedBy($content['authors']); | ||
88 | } | ||
89 | |||
82 | $entry->setLanguage(isset($content['language']) ? $content['language'] : ''); | 90 | $entry->setLanguage(isset($content['language']) ? $content['language'] : ''); |
83 | $entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : ''); | 91 | $entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : ''); |
84 | $entry->setReadingTime(Utils::getReadingTime($html)); | 92 | $entry->setReadingTime(Utils::getReadingTime($html)); |