aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Updater.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-07-05 20:29:55 +0200
committerArthurHoaro <arthur@hoa.ro>2018-07-05 20:34:22 +0200
commitb302b3c584b84f22f0e6f187b072180ecbacdfab (patch)
tree297f72d8fcf6d158ebbb8198dee4e35a30ab0d7e /application/Updater.php
parentfcba541e2f12c85ac56c6915ba1319fbdd3e6962 (diff)
downloadShaarli-b302b3c584b84f22f0e6f187b072180ecbacdfab.tar.gz
Shaarli-b302b3c584b84f22f0e6f187b072180ecbacdfab.tar.zst
Shaarli-b302b3c584b84f22f0e6f187b072180ecbacdfab.zip
Thumbnails: add a common mode to only retrieve thumbs from popular media websites
Diffstat (limited to 'application/Updater.php')
-rw-r--r--application/Updater.php5
1 files changed, 3 insertions, 2 deletions
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 @@
2use Shaarli\Config\ConfigJson; 2use Shaarli\Config\ConfigJson;
3use Shaarli\Config\ConfigPhp; 3use Shaarli\Config\ConfigPhp;
4use Shaarli\Config\ConfigManager; 4use Shaarli\Config\ConfigManager;
5use Shaarli\Thumbnailer;
5 6
6/** 7/**
7 * Class Updater. 8 * Class Updater.
@@ -497,12 +498,12 @@ class Updater
497 */ 498 */
498 public function updateMethodWebThumbnailer() 499 public function updateMethodWebThumbnailer()
499 { 500 {
500 if ($this->conf->exists('thumbnails.enabled')) { 501 if ($this->conf->exists('thumbnails.mode')) {
501 return true; 502 return true;
502 } 503 }
503 504
504 $thumbnailsEnabled = $this->conf->get('thumbnail.enable_thumbnails', true); 505 $thumbnailsEnabled = $this->conf->get('thumbnail.enable_thumbnails', true);
505 $this->conf->set('thumbnails.enabled', $thumbnailsEnabled); 506 $this->conf->set('thumbnails.mode', $thumbnailsEnabled ? Thumbnailer::MODE_ALL : Thumbnailer::MODE_NONE);
506 $this->conf->set('thumbnails.width', 125); 507 $this->conf->set('thumbnails.width', 125);
507 $this->conf->set('thumbnails.height', 90); 508 $this->conf->set('thumbnails.height', 90);
508 $this->conf->remove('thumbnail'); 509 $this->conf->remove('thumbnail');