]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Temporary fix for head titles 405/head
authorArthurHoaro <arthur@hoa.ro>
Mon, 7 Dec 2015 09:29:24 +0000 (10:29 +0100)
committerArthurHoaro <arthur@hoa.ro>
Mon, 7 Dec 2015 09:29:24 +0000 (10:29 +0100)
only set the title on permalink.

index.php [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 81ab767..0dd5829
--- a/index.php
+++ b/index.php
@@ -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()));