aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2019-02-09 13:52:12 +0100
committerArthurHoaro <arthur@hoa.ro>2019-02-09 13:55:11 +0100
commit520d29578c57e476ece3bdd20c286d196b7b61b4 (patch)
tree6f221285ec8e30d6ddfb32e996949738ebaa410a /index.php
parent905f8675a728841b03b300d2c7dc909a1c4f7f03 (diff)
downloadShaarli-520d29578c57e476ece3bdd20c286d196b7b61b4.tar.gz
Shaarli-520d29578c57e476ece3bdd20c286d196b7b61b4.tar.zst
Shaarli-520d29578c57e476ece3bdd20c286d196b7b61b4.zip
Remove the redirector setting
Fixes #1239
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 633ab89e..9ea26c7c 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
@@ -1662,11 +1652,7 @@ function buildLinkList($PAGE, $LINKSDB, $conf, $pluginManager, $loginManager)
1662 $linkDisp = array(); 1652 $linkDisp = array();
1663 while ($i<$end && $i<count($keys)) { 1653 while ($i<$end && $i<count($keys)) {
1664 $link = $linksToDisplay[$keys[$i]]; 1654 $link = $linksToDisplay[$keys[$i]];
1665 $link['description'] = format_description( 1655 $link['description'] = format_description($link['description']);
1666 $link['description'],
1667 $conf->get('redirector.url'),
1668 $conf->get('redirector.encode_url')
1669 );
1670 $classLi = ($i % 2) != 0 ? '' : 'publicLinkHightLight'; 1656 $classLi = ($i % 2) != 0 ? '' : 'publicLinkHightLight';
1671 $link['class'] = $link['private'] == 0 ? $classLi : 'private'; 1657 $link['class'] = $link['private'] == 0 ? $classLi : 'private';
1672 $link['timestamp'] = $link['created']->getTimestamp(); 1658 $link['timestamp'] = $link['created']->getTimestamp();
@@ -1727,7 +1713,6 @@ function buildLinkList($PAGE, $LINKSDB, $conf, $pluginManager, $loginManager)
1727 'search_term' => $searchterm, 1713 'search_term' => $searchterm,
1728 'search_tags' => $searchtags, 1714 'search_tags' => $searchtags,
1729 'visibility' => ! empty($_SESSION['visibility']) ? $_SESSION['visibility'] : '', 1715 'visibility' => ! empty($_SESSION['visibility']) ? $_SESSION['visibility'] : '',
1730 'redirector' => $conf->get('redirector.url'), // Optional redirector URL.
1731 'links' => $linkDisp, 1716 'links' => $linkDisp,
1732 ); 1717 );
1733 1718
@@ -1877,9 +1862,7 @@ try {
1877$linkDb = new LinkDB( 1862$linkDb = new LinkDB(
1878 $conf->get('resource.datastore'), 1863 $conf->get('resource.datastore'),
1879 $loginManager->isLoggedIn(), 1864 $loginManager->isLoggedIn(),
1880 $conf->get('privacy.hide_public_links'), 1865 $conf->get('privacy.hide_public_links')
1881 $conf->get('redirector.url'),
1882 $conf->get('redirector.encode_url')
1883); 1866);
1884 1867
1885$container = new \Slim\Container(); 1868$container = new \Slim\Container();