aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-11-20 17:39:14 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2017-11-20 18:47:48 +0100
commit8a21985474c2daae9f84ac52463fe7d297aae3ae (patch)
tree278b3c516222f3a1f6286f7c62a0852bb61fcb65 /src
parente585dde46c4ed9e0223925968f1634e81c15c67f (diff)
downloadwallabag-8a21985474c2daae9f84ac52463fe7d297aae3ae.tar.gz
wallabag-8a21985474c2daae9f84ac52463fe7d297aae3ae.tar.zst
wallabag-8a21985474c2daae9f84ac52463fe7d297aae3ae.zip
Added internal setting to enable/disable headers storage
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php6
-rw-r--r--src/Wallabag/CoreBundle/Resources/config/services.yml1
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..3f5e4760 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)
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