From b302b3c584b84f22f0e6f187b072180ecbacdfab Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 5 Jul 2018 20:29:55 +0200 Subject: Thumbnails: add a common mode to only retrieve thumbs from popular media websites --- application/Updater.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'application/Updater.php') diff --git a/application/Updater.php b/application/Updater.php index f6b9e205..2a4c807c 100644 --- a/application/Updater.php +++ b/application/Updater.php @@ -2,6 +2,7 @@ use Shaarli\Config\ConfigJson; use Shaarli\Config\ConfigPhp; use Shaarli\Config\ConfigManager; +use Shaarli\Thumbnailer; /** * Class Updater. @@ -497,12 +498,12 @@ class Updater */ public function updateMethodWebThumbnailer() { - if ($this->conf->exists('thumbnails.enabled')) { + if ($this->conf->exists('thumbnails.mode')) { return true; } $thumbnailsEnabled = $this->conf->get('thumbnail.enable_thumbnails', true); - $this->conf->set('thumbnails.enabled', $thumbnailsEnabled); + $this->conf->set('thumbnails.mode', $thumbnailsEnabled ? Thumbnailer::MODE_ALL : Thumbnailer::MODE_NONE); $this->conf->set('thumbnails.width', 125); $this->conf->set('thumbnails.height', 90); $this->conf->remove('thumbnail'); -- cgit v1.2.3