From: ArthurHoaro Date: Sat, 11 Aug 2018 11:37:05 +0000 (+0200) Subject: Merge pull request #1202 from ArthurHoaro/composer X-Git-Tag: v0.10.1~3 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=dc5e0944833a489ad64fa306e360316a9f24d77b;hp=62f5a7581380da7885025498de10e9a20c45b358;p=github%2Fshaarli%2FShaarli.git Merge pull request #1202 from ArthurHoaro/composer Upgrade composer - web-thumbnailer v1.3.0 --- diff --git a/.htaccess b/.htaccess index b238854c..4c004271 100644 --- a/.htaccess +++ b/.htaccess @@ -16,8 +16,33 @@ RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [QSA,L] + + = 2.4> + Require all granted + + + Allow from all + Deny from none + + + + Require all granted + + + + = 2.4> + Require all denied + + + Allow from none + Deny from all + + + + Require all denied + 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); diff --git a/index.php b/index.php index 925d47a5..4b86a3e2 100644 --- a/index.php +++ b/index.php @@ -1635,9 +1635,9 @@ function buildLinkList($PAGE, $LINKSDB, $conf, $pluginManager, $loginManager) uasort($taglist, 'strcasecmp'); $link['taglist'] = $taglist; - // Thumbnails enabled, not a note, + // Logged in, thumbnails enabled, not a note, // and (never retrieved yet or no valid cache file) - if ($thumbnailsEnabled && $link['url'][0] != '?' + if ($loginManager->isLoggedIn() && $thumbnailsEnabled && $link['url'][0] != '?' && (! isset($link['thumbnail']) || ($link['thumbnail'] !== false && ! is_file($link['thumbnail']))) ) { $elem = $LINKSDB[$keys[$i]];