diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -1676,10 +1676,7 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager) | |||
1676 | $keys[] = $key; | 1676 | $keys[] = $key; |
1677 | } | 1677 | } |
1678 | 1678 | ||
1679 | // If there is only a single link, we change on-the-fly the title of the page. | 1679 | |
1680 | if (count($linksToDisplay) == 1) { | ||
1681 | $conf->set('pagetitle', $linksToDisplay[$keys[0]]['title'] .' - '. $conf->get('general.title')); | ||
1682 | } | ||
1683 | 1680 | ||
1684 | // Select articles according to paging. | 1681 | // Select articles according to paging. |
1685 | $pagecount = ceil(count($keys) / $_SESSION['LINKS_PER_PAGE']); | 1682 | $pagecount = ceil(count($keys) / $_SESSION['LINKS_PER_PAGE']); |
@@ -1741,9 +1738,10 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager) | |||
1741 | 'links' => $linkDisp, | 1738 | 'links' => $linkDisp, |
1742 | 'tags' => $LINKSDB->allTags(), | 1739 | 'tags' => $LINKSDB->allTags(), |
1743 | ); | 1740 | ); |
1744 | // FIXME! temporary fix - see #399. | 1741 | |
1745 | 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. |
1746 | $data['pagetitle'] = $conf->get('pagetitle'); | 1743 | if (count($linksToDisplay) == 1) { |
1744 | $data['pagetitle'] = $linksToDisplay[$keys[0]]['title'] .' - '. $conf->get('general.title'); | ||
1747 | } | 1745 | } |
1748 | 1746 | ||
1749 | $pluginManager->executeHooks('render_linklist', $data, array('loggedin' => isLoggedIn())); | 1747 | $pluginManager->executeHooks('render_linklist', $data, array('loggedin' => isLoggedIn())); |