Merge pull request #405 from ArthurHoaro/titles-fix

Temporary fix for head titles
This commit is contained in:
Arthur 2015-12-07 10:54:45 +01:00
commit b373ddc1df
1 changed files with 4 additions and 1 deletions

5
index.php Normal file → Executable file
View File

@ -1948,7 +1948,6 @@ function buildLinkList($PAGE,$LINKSDB)
// Fill all template fields.
$data = array(
'pagetitle' => $GLOBALS['pagetitle'],
'linkcount' => count($LINKSDB),
'previous_page_url' => $previous_page_url,
'next_page_url' => $next_page_url,
@ -1962,6 +1961,10 @@ function buildLinkList($PAGE,$LINKSDB)
'links' => $linkDisp,
'tags' => $LINKSDB->allTags(),
);
// FIXME! temporary fix - see #399.
if (!empty($GLOBALS['pagetitle']) && count($linkDisp) == 1) {
$data['pagetitle'] = $GLOBALS['pagetitle'];
}
$pluginManager = PluginManager::getInstance();
$pluginManager->executeHooks('render_linklist', $data, array('loggedin' => isLoggedIn()));