]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Helper/ContentProxy.php
Merge remote-tracking branch 'origin/master' into 2.2
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Helper / ContentProxy.php
index bbd5db5d1f1bed84a2c103035f49114a3857ad5e..fd059325458892c33dcaf576593839e42766d5b6 100644 (file)
@@ -3,7 +3,7 @@
 namespace Wallabag\CoreBundle\Helper;
 
 use Graby\Graby;
-use Psr\Log\LoggerInterface as Logger;
+use Psr\Log\LoggerInterface;
 use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\CoreBundle\Entity\Tag;
 use Wallabag\CoreBundle\Tools\Utils;
@@ -22,7 +22,7 @@ class ContentProxy
     protected $tagRepository;
     protected $mimeGuesser;
 
-    public function __construct(Graby $graby, RuleBasedTagger $tagger, TagRepository $tagRepository, Logger $logger)
+    public function __construct(Graby $graby, RuleBasedTagger $tagger, TagRepository $tagRepository, LoggerInterface $logger)
     {
         $this->graby = $graby;
         $this->tagger = $tagger;
@@ -69,6 +69,8 @@ class ContentProxy
         $entry->setUrl($content['url'] ?: $url);
         $entry->setTitle($title);
         $entry->setContent($html);
+        $entry->setHttpStatus(isset($content['status']) ? $content['status'] : '');
+
         $entry->setLanguage($content['language']);
         $entry->setMimetype($content['content_type']);
         $entry->setReadingTime(Utils::getReadingTime($html));