diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Event')
-rw-r--r-- | src/Wallabag/CoreBundle/Event/Subscriber/DownloadImagesSubscriber.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Event/Subscriber/DownloadImagesSubscriber.php b/src/Wallabag/CoreBundle/Event/Subscriber/DownloadImagesSubscriber.php index 0792653e..3f2d460c 100644 --- a/src/Wallabag/CoreBundle/Event/Subscriber/DownloadImagesSubscriber.php +++ b/src/Wallabag/CoreBundle/Event/Subscriber/DownloadImagesSubscriber.php | |||
@@ -52,6 +52,10 @@ class DownloadImagesSubscriber implements EventSubscriber | |||
52 | $config = new $this->configClass(); | 52 | $config = new $this->configClass(); |
53 | $config->setEntityManager($args->getEntityManager()); | 53 | $config->setEntityManager($args->getEntityManager()); |
54 | 54 | ||
55 | if (!$config->get('download_images_enabled')) { | ||
56 | return; | ||
57 | } | ||
58 | |||
55 | // field content has been updated | 59 | // field content has been updated |
56 | if ($args->hasChangedField('content')) { | 60 | if ($args->hasChangedField('content')) { |
57 | $html = $this->downloadImages($config, $entity); | 61 | $html = $this->downloadImages($config, $entity); |
@@ -87,6 +91,10 @@ class DownloadImagesSubscriber implements EventSubscriber | |||
87 | $config = new $this->configClass(); | 91 | $config = new $this->configClass(); |
88 | $config->setEntityManager($args->getEntityManager()); | 92 | $config->setEntityManager($args->getEntityManager()); |
89 | 93 | ||
94 | if (!$config->get('download_images_enabled')) { | ||
95 | return; | ||
96 | } | ||
97 | |||
90 | // update all images inside the html | 98 | // update all images inside the html |
91 | $html = $this->downloadImages($config, $entity); | 99 | $html = $this->downloadImages($config, $entity); |
92 | if (false !== $html) { | 100 | if (false !== $html) { |