aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php27
1 files changed, 5 insertions, 22 deletions
diff --git a/index.php b/index.php
index 1d505305..3700504b 100644
--- a/index.php
+++ b/index.php
@@ -312,9 +312,7 @@ function showDailyRSS($conf, $loginManager)
312 $LINKSDB = new LinkDB( 312 $LINKSDB = new LinkDB(
313 $conf->get('resource.datastore'), 313 $conf->get('resource.datastore'),
314 $loginManager->isLoggedIn(), 314 $loginManager->isLoggedIn(),
315 $conf->get('privacy.hide_public_links'), 315 $conf->get('privacy.hide_public_links')
316 $conf->get('redirector.url'),
317 $conf->get('redirector.encode_url')
318 ); 316 );
319 317
320 /* Some Shaarlies may have very few links, so we need to look 318 /* Some Shaarlies may have very few links, so we need to look
@@ -356,11 +354,7 @@ function showDailyRSS($conf, $loginManager)
356 354
357 // We pre-format some fields for proper output. 355 // We pre-format some fields for proper output.
358 foreach ($links as &$link) { 356 foreach ($links as &$link) {
359 $link['formatedDescription'] = format_description( 357 $link['formatedDescription'] = format_description($link['description']);
360 $link['description'],
361 $conf->get('redirector.url'),
362 $conf->get('redirector.encode_url')
363 );
364 $link['timestamp'] = $link['created']->getTimestamp(); 358 $link['timestamp'] = $link['created']->getTimestamp();
365 if (startsWith($link['url'], '?')) { 359 if (startsWith($link['url'], '?')) {
366 $link['url'] = index_url($_SERVER) . $link['url']; // make permalink URL absolute 360 $link['url'] = index_url($_SERVER) . $link['url']; // make permalink URL absolute
@@ -433,11 +427,7 @@ function showDaily($pageBuilder, $LINKSDB, $conf, $pluginManager, $loginManager)
433 $taglist = explode(' ', $link['tags']); 427 $taglist = explode(' ', $link['tags']);
434 uasort($taglist, 'strcasecmp'); 428 uasort($taglist, 'strcasecmp');
435 $linksToDisplay[$key]['taglist']=$taglist; 429 $linksToDisplay[$key]['taglist']=$taglist;
436 $linksToDisplay[$key]['formatedDescription'] = format_description( 430 $linksToDisplay[$key]['formatedDescription'] = format_description($link['description']);
437 $link['description'],
438 $conf->get('redirector.url'),
439 $conf->get('redirector.encode_url')
440 );
441 $linksToDisplay[$key]['timestamp'] = $link['created']->getTimestamp(); 431 $linksToDisplay[$key]['timestamp'] = $link['created']->getTimestamp();
442 } 432 }
443 433
@@ -1664,11 +1654,7 @@ function buildLinkList($PAGE, $LINKSDB, $conf, $pluginManager, $loginManager)
1664 $linkDisp = array(); 1654 $linkDisp = array();
1665 while ($i<$end && $i<count($keys)) { 1655 while ($i<$end && $i<count($keys)) {
1666 $link = $linksToDisplay[$keys[$i]]; 1656 $link = $linksToDisplay[$keys[$i]];
1667 $link['description'] = format_description( 1657 $link['description'] = format_description($link['description']);
1668 $link['description'],
1669 $conf->get('redirector.url'),
1670 $conf->get('redirector.encode_url')
1671 );
1672 $classLi = ($i % 2) != 0 ? '' : 'publicLinkHightLight'; 1658 $classLi = ($i % 2) != 0 ? '' : 'publicLinkHightLight';
1673 $link['class'] = $link['private'] == 0 ? $classLi : 'private'; 1659 $link['class'] = $link['private'] == 0 ? $classLi : 'private';
1674 $link['timestamp'] = $link['created']->getTimestamp(); 1660 $link['timestamp'] = $link['created']->getTimestamp();
@@ -1729,7 +1715,6 @@ function buildLinkList($PAGE, $LINKSDB, $conf, $pluginManager, $loginManager)
1729 'search_term' => $searchterm, 1715 'search_term' => $searchterm,
1730 'search_tags' => $searchtags, 1716 'search_tags' => $searchtags,
1731 'visibility' => ! empty($_SESSION['visibility']) ? $_SESSION['visibility'] : '', 1717 'visibility' => ! empty($_SESSION['visibility']) ? $_SESSION['visibility'] : '',
1732 'redirector' => $conf->get('redirector.url'), // Optional redirector URL.
1733 'links' => $linkDisp, 1718 'links' => $linkDisp,
1734 ); 1719 );
1735 1720
@@ -1879,9 +1864,7 @@ try {
1879$linkDb = new LinkDB( 1864$linkDb = new LinkDB(
1880 $conf->get('resource.datastore'), 1865 $conf->get('resource.datastore'),
1881 $loginManager->isLoggedIn(), 1866 $loginManager->isLoggedIn(),
1882 $conf->get('privacy.hide_public_links'), 1867 $conf->get('privacy.hide_public_links')
1883 $conf->get('redirector.url'),
1884 $conf->get('redirector.encode_url')
1885); 1868);
1886 1869
1887$container = new \Slim\Container(); 1870$container = new \Slim\Container();