From b5c368b85885b82e7db7e509c8a7e2035d51e0a1 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Fri, 10 Aug 2018 17:09:51 +0200 Subject: Fix issue 'You are not authorized to add a link' with thumbnails enabled Do not try to alter the datastore by updating thumbnails if the user isn't logged in. Also, do not enable thumbnails if PHP GD extension is not installed/loaded --- application/Updater.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application') diff --git a/application/Updater.php b/application/Updater.php index c2aa1568..480bff82 100644 --- a/application/Updater.php +++ b/application/Updater.php @@ -502,7 +502,7 @@ class Updater return true; } - $thumbnailsEnabled = $this->conf->get('thumbnail.enable_thumbnails', true); + $thumbnailsEnabled = extension_loaded('gd') && $this->conf->get('thumbnail.enable_thumbnails', true); $this->conf->set('thumbnails.mode', $thumbnailsEnabled ? Thumbnailer::MODE_ALL : Thumbnailer::MODE_NONE); $this->conf->set('thumbnails.width', 125); $this->conf->set('thumbnails.height', 90); -- cgit v1.2.3