]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - index.php
Fix issue 'You are not authorized to add a link' with thumbnails enabled
[github/shaarli/Shaarli.git] / index.php
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]];