]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Helper/ContentProxy.php
Added author of article
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Helper / ContentProxy.php
index 5635866530def1643bcacbe987c2bb3ddbc95b4a..d45aef8894d6d0fe154efc7fb6344e2840059a30 100644 (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));