aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php29
1 files changed, 7 insertions, 22 deletions
diff --git a/index.php b/index.php
index 7b54f98f..a43063b0 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 (is_note($link['url'])) { 359 if (is_note($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
@@ -1183,6 +1173,8 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
1183 $link['thumbnail'] = $thumbnailer->get($url); 1173 $link['thumbnail'] = $thumbnailer->get($url);
1184 } 1174 }
1185 1175
1176 $link['sticky'] = isset($link['sticky']) ? $link['sticky'] : false;
1177
1186 $pluginManager->executeHooks('save_link', $link); 1178 $pluginManager->executeHooks('save_link', $link);
1187 1179
1188 $LINKSDB[$id] = $link; 1180 $LINKSDB[$id] = $link;
@@ -1664,11 +1656,7 @@ function buildLinkList($PAGE, $LINKSDB, $conf, $pluginManager, $loginManager)
1664 $linkDisp = array(); 1656 $linkDisp = array();
1665 while ($i<$end && $i<count($keys)) { 1657 while ($i<$end && $i<count($keys)) {
1666 $link = $linksToDisplay[$keys[$i]]; 1658 $link = $linksToDisplay[$keys[$i]];
1667 $link['description'] = format_description( 1659 $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'; 1660 $classLi = ($i % 2) != 0 ? '' : 'publicLinkHightLight';
1673 $link['class'] = $link['private'] == 0 ? $classLi : 'private'; 1661 $link['class'] = $link['private'] == 0 ? $classLi : 'private';
1674 $link['timestamp'] = $link['created']->getTimestamp(); 1662 $link['timestamp'] = $link['created']->getTimestamp();
@@ -1729,7 +1717,6 @@ function buildLinkList($PAGE, $LINKSDB, $conf, $pluginManager, $loginManager)
1729 'search_term' => $searchterm, 1717 'search_term' => $searchterm,
1730 'search_tags' => $searchtags, 1718 'search_tags' => $searchtags,
1731 'visibility' => ! empty($_SESSION['visibility']) ? $_SESSION['visibility'] : '', 1719 'visibility' => ! empty($_SESSION['visibility']) ? $_SESSION['visibility'] : '',
1732 'redirector' => $conf->get('redirector.url'), // Optional redirector URL.
1733 'links' => $linkDisp, 1720 'links' => $linkDisp,
1734 ); 1721 );
1735 1722
@@ -1879,9 +1866,7 @@ try {
1879$linkDb = new LinkDB( 1866$linkDb = new LinkDB(
1880 $conf->get('resource.datastore'), 1867 $conf->get('resource.datastore'),
1881 $loginManager->isLoggedIn(), 1868 $loginManager->isLoggedIn(),
1882 $conf->get('privacy.hide_public_links'), 1869 $conf->get('privacy.hide_public_links')
1883 $conf->get('redirector.url'),
1884 $conf->get('redirector.encode_url')
1885); 1870);
1886 1871
1887$container = new \Slim\Container(); 1872$container = new \Slim\Container();