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>
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);
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]];