aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Helper/ContentProxy.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-04-06 09:36:20 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2017-04-09 15:24:51 +0200
commit7b0b3622ab2dd909028481b294c91f88a5682671 (patch)
treecf9a9b432a8f123b8cf7400e387ba3113e8c8cc4 /src/Wallabag/CoreBundle/Helper/ContentProxy.php
parent5e9009ce86a366001616fad5b28cb59dc20ee4df (diff)
downloadwallabag-7b0b3622ab2dd909028481b294c91f88a5682671.tar.gz
wallabag-7b0b3622ab2dd909028481b294c91f88a5682671.tar.zst
wallabag-7b0b3622ab2dd909028481b294c91f88a5682671.zip
Added author of article
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper/ContentProxy.php')
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
index 56358665..d45aef88 100644
--- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php
+++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
@@ -79,10 +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']) { 82 if (isset($content['date']) && null !== $content['date'] && '' !== $content['date']) {
83 $entry->setPublishedAt(new \DateTime($content['date'])); 83 $entry->setPublishedAt(new \DateTime($content['date']));
84 } 84 }
85 85
86 if (!empty($content['authors'])) {
87 $entry->setPublishedBy($content['authors']);
88 }
89
86 $entry->setLanguage(isset($content['language']) ? $content['language'] : ''); 90 $entry->setLanguage(isset($content['language']) ? $content['language'] : '');
87 $entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : ''); 91 $entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : '');
88 $entry->setReadingTime(Utils::getReadingTime($html)); 92 $entry->setReadingTime(Utils::getReadingTime($html));