X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FHelper%2FContentProxy.php;h=3f5e4760b2e56abeb8f0fa2dc378e9d1348c9d60;hb=8a21985474c2daae9f84ac52463fe7d297aae3ae;hp=854acb6ae3c540d433d7863517b597db566d53ac;hpb=e585dde46c4ed9e0223925968f1634e81c15c67f;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index 854acb6a..3f5e4760 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -24,8 +24,9 @@ class ContentProxy protected $mimeGuesser; protected $fetchingErrorMessage; protected $eventDispatcher; + protected $storeArticleHeaders; - public function __construct(Graby $graby, RuleBasedTagger $tagger, ValidatorInterface $validator, LoggerInterface $logger, $fetchingErrorMessage) + public function __construct(Graby $graby, RuleBasedTagger $tagger, ValidatorInterface $validator, LoggerInterface $logger, $fetchingErrorMessage, $storeArticleHeaders) { $this->graby = $graby; $this->tagger = $tagger; @@ -33,6 +34,7 @@ class ContentProxy $this->logger = $logger; $this->mimeGuesser = new MimeTypeExtensionGuesser(); $this->fetchingErrorMessage = $fetchingErrorMessage; + $this->storeArticleHeaders = $storeArticleHeaders; } /** @@ -185,7 +187,7 @@ class ContentProxy $entry->setPublishedBy($content['authors']); } - if (!empty($content['all_headers'])) { + if (!empty($content['all_headers']) && $this->storeArticleHeaders) { $entry->setHeaders($content['all_headers']); }