diff options
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/ContentProxy.php | 6 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/config/services.yml | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index 854acb6a..4cc20c9c 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php | |||
@@ -24,8 +24,9 @@ class ContentProxy | |||
24 | protected $mimeGuesser; | 24 | protected $mimeGuesser; |
25 | protected $fetchingErrorMessage; | 25 | protected $fetchingErrorMessage; |
26 | protected $eventDispatcher; | 26 | protected $eventDispatcher; |
27 | protected $storeArticleHeaders; | ||
27 | 28 | ||
28 | public function __construct(Graby $graby, RuleBasedTagger $tagger, ValidatorInterface $validator, LoggerInterface $logger, $fetchingErrorMessage) | 29 | public function __construct(Graby $graby, RuleBasedTagger $tagger, ValidatorInterface $validator, LoggerInterface $logger, $fetchingErrorMessage, $storeArticleHeaders = false) |
29 | { | 30 | { |
30 | $this->graby = $graby; | 31 | $this->graby = $graby; |
31 | $this->tagger = $tagger; | 32 | $this->tagger = $tagger; |
@@ -33,6 +34,7 @@ class ContentProxy | |||
33 | $this->logger = $logger; | 34 | $this->logger = $logger; |
34 | $this->mimeGuesser = new MimeTypeExtensionGuesser(); | 35 | $this->mimeGuesser = new MimeTypeExtensionGuesser(); |
35 | $this->fetchingErrorMessage = $fetchingErrorMessage; | 36 | $this->fetchingErrorMessage = $fetchingErrorMessage; |
37 | $this->storeArticleHeaders = $storeArticleHeaders; | ||
36 | } | 38 | } |
37 | 39 | ||
38 | /** | 40 | /** |
@@ -185,7 +187,7 @@ class ContentProxy | |||
185 | $entry->setPublishedBy($content['authors']); | 187 | $entry->setPublishedBy($content['authors']); |
186 | } | 188 | } |
187 | 189 | ||
188 | if (!empty($content['all_headers'])) { | 190 | if (!empty($content['all_headers']) && $this->storeArticleHeaders) { |
189 | $entry->setHeaders($content['all_headers']); | 191 | $entry->setHeaders($content['all_headers']); |
190 | } | 192 | } |
191 | 193 | ||
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 31b16739..85306276 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml | |||
@@ -94,6 +94,7 @@ services: | |||
94 | - "@validator" | 94 | - "@validator" |
95 | - "@logger" | 95 | - "@logger" |
96 | - '%wallabag_core.fetching_error_message%' | 96 | - '%wallabag_core.fetching_error_message%' |
97 | - '@=service(''craue_config'').get(''store_article_headers'')' | ||
97 | 98 | ||
98 | wallabag_core.tags_assigner: | 99 | wallabag_core.tags_assigner: |
99 | class: Wallabag\CoreBundle\Helper\TagsAssigner | 100 | class: Wallabag\CoreBundle\Helper\TagsAssigner |