X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=8f6ee50affaf45f69c0d169f4b4f36901af5f1ba;hb=bede8e1b633d720d6a7d1b05ba367811f3ac2b87;hp=925d47a5e476b55260e9cda84fbfa33e554b66cc;hpb=75c4b0d03b6e9a4323675091dbfa664a1bd006eb;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index 925d47a5..8f6ee50a 100644 --- a/index.php +++ b/index.php @@ -1236,10 +1236,10 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, $id = (int) escape($id); $link = $LINKSDB[$id]; $pluginManager->executeHooks('delete_link', $link); + $history->deleteLink($link); unset($LINKSDB[$id]); } $LINKSDB->save($conf->get('resource.page_cache')); // save to disk - $history->deleteLink($link); // If we are called from the bookmarklet, we must close the popup: if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo ''; exit; } @@ -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]];