X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=55b12adc9384859c472b4135292ff12beec50415;hb=a4cd07eee24fc5d4bcda1ab314731abe7624c51d;hp=0bda46f9b6fe0046148ef519b353956aced741ba;hpb=2d97aa77815ff866dee514d1a63ec9ee26b20a0e;p=github%2Fshaarli%2FShaarli.git 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) $PAGE->assign('timezone_form', $timezone_form); $PAGE->assign('timezone_js',$timezone_js); $PAGE->assign('private_links_default', $conf->get('privacy.default_private_links', false)); + $PAGE->assign('session_protection_disabled', $conf->get('security.session_protection_disabled', false)); $PAGE->assign('enable_rss_permalinks', $conf->get('feed.rss_permalinks', false)); $PAGE->assign('enable_update_check', $conf->get('updates.check_updates', true)); $PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false)); @@ -1675,10 +1676,7 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager) $keys[] = $key; } - // If there is only a single link, we change on-the-fly the title of the page. - if (count($linksToDisplay) == 1) { - $conf->set('pagetitle', $linksToDisplay[$keys[0]]['title'] .' - '. $conf->get('general.title')); - } + // Select articles according to paging. $pagecount = ceil(count($keys) / $_SESSION['LINKS_PER_PAGE']); @@ -1740,9 +1738,10 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager) 'links' => $linkDisp, 'tags' => $LINKSDB->allTags(), ); - // FIXME! temporary fix - see #399. - if ($conf->exists('pagetitle') && count($linkDisp) == 1) { - $data['pagetitle'] = $conf->get('pagetitle'); + + // If there is only a single link, we change on-the-fly the title of the page. + if (count($linksToDisplay) == 1) { + $data['pagetitle'] = $linksToDisplay[$keys[0]]['title'] .' - '. $conf->get('general.title'); } $pluginManager->executeHooks('render_linklist', $data, array('loggedin' => isLoggedIn()));