diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-07-29 17:40:05 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2018-07-29 17:49:53 +0200 |
commit | bf3c9934d2dc02cead5995570239c5c6230ed5e5 (patch) | |
tree | 8add5495bf1080cfa09e5f8768d8ef2c558344d0 /index.php | |
parent | a4f0509a77a39d1ac834d4967e3e8f245de6d68d (diff) | |
download | Shaarli-bf3c9934d2dc02cead5995570239c5c6230ed5e5.tar.gz Shaarli-bf3c9934d2dc02cead5995570239c5c6230ed5e5.tar.zst Shaarli-bf3c9934d2dc02cead5995570239c5c6230ed5e5.zip |
Fix fatal error on daily page: use new thumbnail system
Also fix:
* include the login manager in the daily RSS feed function
* remove redirector setting in the vintage theme
Fixes #1190
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 | } |