aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2019-03-02 10:54:06 +0100
committerGitHub <noreply@github.com>2019-03-02 10:54:06 +0100
commitcc69aad4a903dc603f47cfa87aeb1865b03c8950 (patch)
treeffc04dac709b2a4cc732ce10f98fb40a562863c7 /index.php
parent5bb384cd2742ff4f982cbe914cee551b74ab4bad (diff)
parenta8e7da01146455f13ef06b151a7dafedd3acf769 (diff)
downloadShaarli-cc69aad4a903dc603f47cfa87aeb1865b03c8950.tar.gz
Shaarli-cc69aad4a903dc603f47cfa87aeb1865b03c8950.tar.zst
Shaarli-cc69aad4a903dc603f47cfa87aeb1865b03c8950.zip
Merge pull request #1271 from ArthurHoaro/hotfix/thumb-note-retrieve
Do not try to retrieve thumbnails for internal link
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/index.php b/index.php
index 3700504b..a43063b0 100644
--- a/index.php
+++ b/index.php
@@ -356,7 +356,7 @@ function showDailyRSS($conf, $loginManager)
356 foreach ($links as &$link) { 356 foreach ($links as &$link) {
357 $link['formatedDescription'] = format_description($link['description']); 357 $link['formatedDescription'] = format_description($link['description']);
358 $link['timestamp'] = $link['created']->getTimestamp(); 358 $link['timestamp'] = $link['created']->getTimestamp();
359 if (startsWith($link['url'], '?')) { 359 if (is_note($link['url'])) {
360 $link['url'] = index_url($_SERVER) . $link['url']; // make permalink URL absolute 360 $link['url'] = index_url($_SERVER) . $link['url']; // make permalink URL absolute
361 } 361 }
362 } 362 }
@@ -1166,7 +1166,9 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
1166 $link['title'] = $link['url']; 1166 $link['title'] = $link['url'];
1167 } 1167 }
1168 1168
1169 if ($conf->get('thumbnails.mode', Thumbnailer::MODE_NONE) !== Thumbnailer::MODE_NONE) { 1169 if ($conf->get('thumbnails.mode', Thumbnailer::MODE_NONE) !== Thumbnailer::MODE_NONE
1170 && ! is_note($link['url'])
1171 ) {
1170 $thumbnailer = new Thumbnailer($conf); 1172 $thumbnailer = new Thumbnailer($conf);
1171 $link['thumbnail'] = $thumbnailer->get($url); 1173 $link['thumbnail'] = $thumbnailer->get($url);
1172 } 1174 }
@@ -1550,7 +1552,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
1550 $ids = []; 1552 $ids = [];
1551 foreach ($LINKSDB as $link) { 1553 foreach ($LINKSDB as $link) {
1552 // A note or not HTTP(S) 1554 // A note or not HTTP(S)
1553 if ($link['url'][0] === '?' || ! startsWith(strtolower($link['url']), 'http')) { 1555 if (is_note($link['url']) || ! startsWith(strtolower($link['url']), 'http')) {
1554 continue; 1556 continue;
1555 } 1557 }
1556 $ids[] = $link['id']; 1558 $ids[] = $link['id'];