diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-07-30 18:29:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-30 18:29:06 +0200 |
commit | 75c4b0d03b6e9a4323675091dbfa664a1bd006eb (patch) | |
tree | 2c058a87e831e9dfb22d9087f5fdaa5d66eaeefc /index.php | |
parent | 1412d2c245aeed41f1aad928b0aab9d292c1b383 (diff) | |
parent | bf3c9934d2dc02cead5995570239c5c6230ed5e5 (diff) | |
download | Shaarli-75c4b0d03b6e9a4323675091dbfa664a1bd006eb.tar.gz Shaarli-75c4b0d03b6e9a4323675091dbfa664a1bd006eb.tar.zst Shaarli-75c4b0d03b6e9a4323675091dbfa664a1bd006eb.zip |
Merge pull request #1191 from ArthurHoaro/hotfix/daily-thumb
Fix fatal error on daily page: use new thumbnail system
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -356,7 +356,6 @@ function showDailyRSS($conf, $loginManager) { | |||
356 | $conf->get('redirector.url'), | 356 | $conf->get('redirector.url'), |
357 | $conf->get('redirector.encode_url') | 357 | $conf->get('redirector.encode_url') |
358 | ); | 358 | ); |
359 | $link['thumbnail'] = thumbnail($conf, $link['url']); | ||
360 | $link['timestamp'] = $link['created']->getTimestamp(); | 359 | $link['timestamp'] = $link['created']->getTimestamp(); |
361 | if (startsWith($link['url'], '?')) { | 360 | if (startsWith($link['url'], '?')) { |
362 | $link['url'] = index_url($_SERVER) . $link['url']; // make permalink URL absolute | 361 | $link['url'] = index_url($_SERVER) . $link['url']; // make permalink URL absolute |
@@ -371,6 +370,7 @@ function showDailyRSS($conf, $loginManager) { | |||
371 | $tpl->assign('links', $links); | 370 | $tpl->assign('links', $links); |
372 | $tpl->assign('rssdate', escape($dayDate->format(DateTime::RSS))); | 371 | $tpl->assign('rssdate', escape($dayDate->format(DateTime::RSS))); |
373 | $tpl->assign('hide_timestamps', $conf->get('privacy.hide_timestamps', false)); | 372 | $tpl->assign('hide_timestamps', $conf->get('privacy.hide_timestamps', false)); |
373 | $tpl->assign('index_url', $pageaddr); | ||
374 | $html = $tpl->draw('dailyrss', true); | 374 | $html = $tpl->draw('dailyrss', true); |
375 | 375 | ||
376 | echo $html . PHP_EOL; | 376 | echo $html . PHP_EOL; |
@@ -433,7 +433,6 @@ function showDaily($pageBuilder, $LINKSDB, $conf, $pluginManager, $loginManager) | |||
433 | $conf->get('redirector.url'), | 433 | $conf->get('redirector.url'), |
434 | $conf->get('redirector.encode_url') | 434 | $conf->get('redirector.encode_url') |
435 | ); | 435 | ); |
436 | $linksToDisplay[$key]['thumbnail'] = thumbnail($conf, $link['url']); | ||
437 | $linksToDisplay[$key]['timestamp'] = $link['created']->getTimestamp(); | 436 | $linksToDisplay[$key]['timestamp'] = $link['created']->getTimestamp(); |
438 | } | 437 | } |
439 | 438 | ||
@@ -1812,7 +1811,11 @@ function install($conf, $sessionManager, $loginManager) { | |||
1812 | exit; | 1811 | exit; |
1813 | } | 1812 | } |
1814 | 1813 | ||
1815 | if (isset($_SERVER['QUERY_STRING']) && startsWith($_SERVER['QUERY_STRING'], 'do=dailyrss')) { showDailyRSS($conf); exit; } | 1814 | if (isset($_SERVER['QUERY_STRING']) && startsWith($_SERVER['QUERY_STRING'], 'do=dailyrss')) { |
1815 | showDailyRSS($conf, $loginManager); | ||
1816 | exit; | ||
1817 | } | ||
1818 | |||
1816 | if (!isset($_SESSION['LINKS_PER_PAGE'])) { | 1819 | if (!isset($_SESSION['LINKS_PER_PAGE'])) { |
1817 | $_SESSION['LINKS_PER_PAGE'] = $conf->get('general.links_per_page', 20); | 1820 | $_SESSION['LINKS_PER_PAGE'] = $conf->get('general.links_per_page', 20); |
1818 | } | 1821 | } |