diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-05-28 12:02:17 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-05-28 12:02:17 +0200 |
commit | 6e68417f0356d0045d7a2aa3832507d362ddcfe8 (patch) | |
tree | 308e15326adc658702f257693338f101d36e1af8 /src/Wallabag | |
parent | 36b0d52ee4a0ca76049952100eaf393abb3ccbc0 (diff) | |
download | wallabag-6e68417f0356d0045d7a2aa3832507d362ddcfe8.tar.gz wallabag-6e68417f0356d0045d7a2aa3832507d362ddcfe8.tar.zst wallabag-6e68417f0356d0045d7a2aa3832507d362ddcfe8.zip |
Fix tests after rebase
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/ContentProxy.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index 59465ad1..c6fa0d98 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php | |||
@@ -299,8 +299,6 @@ class ContentProxy | |||
299 | // if content is an image, define it as a preview too | 299 | // if content is an image, define it as a preview too |
300 | if (!empty($content['headers']['content-type']) && \in_array($this->mimeGuesser->guess($content['headers']['content-type']), ['jpeg', 'jpg', 'gif', 'png'], true)) { | 300 | if (!empty($content['headers']['content-type']) && \in_array($this->mimeGuesser->guess($content['headers']['content-type']), ['jpeg', 'jpg', 'gif', 'png'], true)) { |
301 | $previewPictureUrl = $content['url']; | 301 | $previewPictureUrl = $content['url']; |
302 | |||
303 | $entry->setMimetype($content['headers']['content-type']); | ||
304 | } elseif (empty($previewPictureUrl)) { | 302 | } elseif (empty($previewPictureUrl)) { |
305 | $this->logger->debug('Extracting images from content to provide a default preview picture'); | 303 | $this->logger->debug('Extracting images from content to provide a default preview picture'); |
306 | $imagesUrls = DownloadImages::extractImagesUrlsFromHtml($content['html']); | 304 | $imagesUrls = DownloadImages::extractImagesUrlsFromHtml($content['html']); |
@@ -311,6 +309,10 @@ class ContentProxy | |||
311 | } | 309 | } |
312 | } | 310 | } |
313 | 311 | ||
312 | if (!empty($content['headers']['content-type'])) { | ||
313 | $entry->setMimetype($content['headers']['content-type']); | ||
314 | } | ||
315 | |||
314 | if (!empty($previewPictureUrl)) { | 316 | if (!empty($previewPictureUrl)) { |
315 | $this->updatePreviewPicture($entry, $previewPictureUrl); | 317 | $this->updatePreviewPicture($entry, $previewPictureUrl); |
316 | } | 318 | } |