aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/index.php b/index.php
index 0bda46f9..55b12adc 100644
--- a/index.php
+++ b/index.php
@@ -1159,6 +1159,7 @@ function renderPage($conf, $pluginManager)
1159 $PAGE->assign('timezone_form', $timezone_form); 1159 $PAGE->assign('timezone_form', $timezone_form);
1160 $PAGE->assign('timezone_js',$timezone_js); 1160 $PAGE->assign('timezone_js',$timezone_js);
1161 $PAGE->assign('private_links_default', $conf->get('privacy.default_private_links', false)); 1161 $PAGE->assign('private_links_default', $conf->get('privacy.default_private_links', false));
1162 $PAGE->assign('session_protection_disabled', $conf->get('security.session_protection_disabled', false));
1162 $PAGE->assign('enable_rss_permalinks', $conf->get('feed.rss_permalinks', false)); 1163 $PAGE->assign('enable_rss_permalinks', $conf->get('feed.rss_permalinks', false));
1163 $PAGE->assign('enable_update_check', $conf->get('updates.check_updates', true)); 1164 $PAGE->assign('enable_update_check', $conf->get('updates.check_updates', true));
1164 $PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false)); 1165 $PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false));
@@ -1675,10 +1676,7 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1675 $keys[] = $key; 1676 $keys[] = $key;
1676 } 1677 }
1677 1678
1678 // If there is only a single link, we change on-the-fly the title of the page. 1679
1679 if (count($linksToDisplay) == 1) {
1680 $conf->set('pagetitle', $linksToDisplay[$keys[0]]['title'] .' - '. $conf->get('general.title'));
1681 }
1682 1680
1683 // Select articles according to paging. 1681 // Select articles according to paging.
1684 $pagecount = ceil(count($keys) / $_SESSION['LINKS_PER_PAGE']); 1682 $pagecount = ceil(count($keys) / $_SESSION['LINKS_PER_PAGE']);
@@ -1740,9 +1738,10 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1740 'links' => $linkDisp, 1738 'links' => $linkDisp,
1741 'tags' => $LINKSDB->allTags(), 1739 'tags' => $LINKSDB->allTags(),
1742 ); 1740 );
1743 // FIXME! temporary fix - see #399. 1741
1744 if ($conf->exists('pagetitle') && count($linkDisp) == 1) { 1742 // If there is only a single link, we change on-the-fly the title of the page.
1745 $data['pagetitle'] = $conf->get('pagetitle'); 1743 if (count($linksToDisplay) == 1) {
1744 $data['pagetitle'] = $linksToDisplay[$keys[0]]['title'] .' - '. $conf->get('general.title');
1746 } 1745 }
1747 1746
1748 $pluginManager->executeHooks('render_linklist', $data, array('loggedin' => isLoggedIn())); 1747 $pluginManager->executeHooks('render_linklist', $data, array('loggedin' => isLoggedIn()));