]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #1202 from ArthurHoaro/composer
authorArthurHoaro <arthur@hoa.ro>
Sat, 11 Aug 2018 11:37:05 +0000 (13:37 +0200)
committerGitHub <noreply@github.com>
Sat, 11 Aug 2018 11:37:05 +0000 (13:37 +0200)
Upgrade composer - web-thumbnailer v1.3.0

.htaccess
application/Updater.php
index.php

index b238854c7929d911bb7dc1b5093e29dfbee7cd46..4c00427195ecb0998589fc09dd02fa8580d97a3e 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -16,8 +16,33 @@ RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^ index.php [QSA,L]
 
 <Limit GET POST PUT DELETE OPTIONS>
+  <IfModule version_module>
+    <IfVersion >= 2.4>
+       Require all granted
+    </IfVersion>
+    <IfVersion < 2.4>
+       Allow from all
+       Deny from none
+    </IfVersion>
+  </IfModule>
+
+  <IfModule !version_module>
     Require all granted
+  </IfModule>
 </Limit>
+
 <LimitExcept GET POST PUT DELETE OPTIONS>
+  <IfModule version_module>
+    <IfVersion >= 2.4>
+       Require all denied
+    </IfVersion>
+    <IfVersion < 2.4>
+       Allow from none
+       Deny from all
+    </IfVersion>
+  </IfModule>
+
+  <IfModule !version_module>
     Require all denied
+  </IfModule>
 </LimitExcept>
index c2aa1568cdc01534a3e1efd885e494536884342e..480bff8267956ad82e12d3a4169e7b09f60ee135 100644 (file)
@@ -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);
index 925d47a5e476b55260e9cda84fbfa33e554b66cc..4b86a3e2c17ece7338ad04646cedee6150bbbd47 100644 (file)
--- 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]];