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

5
index.php Normal file → Executable file
View file

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