]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - index.php
add travis-ci.org build status to README
[github/shaarli/Shaarli.git] / index.php
index d0dd5306eb41d28d713079db721986d0a2b3436d..db2b7521d359e413580b017d64669e292ce05d87 100644 (file)
--- a/index.php
+++ b/index.php
@@ -981,7 +981,7 @@ function showDaily()
     $PAGE->assign('linksToDisplay',$linksToDisplay);
     $PAGE->assign('linkcount',count($LINKSDB));
     $PAGE->assign('cols', $columns);
-    $PAGE->assign('day',utf8_encode(strftime('%A %d, %B %Y',linkdate2timestamp($day.'_000000'))));
+    $PAGE->assign('day',linkdate2timestamp($day.'_000000'));
     $PAGE->assign('previousday',$previousday);
     $PAGE->assign('nextday',$nextday);
     $PAGE->renderPage('daily');
@@ -1706,8 +1706,10 @@ function buildLinkList($PAGE,$LINKSDB)
     */
     $keys=array(); foreach($linksToDisplay as $key=>$value) { $keys[]=$key; } // Stupid and ugly. Thanks PHP.
 
-    // If there is only a single link, we change on-the-fly the title of the page.
-    if (count($linksToDisplay)==1) $GLOBALS['pagetitle'] = $linksToDisplay[$keys[0]]['title'].' - '.$GLOBALS['title'];
+    // If it's a permalink, we change on-the-fly the title of the page.
+    if(!empty($search_type && $search_type == 'permalink')) {
+        $GLOBALS['pagetitle'] = $linksToDisplay[$keys[0]]['title'] . ' - ' . $GLOBALS['title'];
+    }
 
     // Select articles according to paging.
     $pagecount = ceil(count($keys)/$_SESSION['LINKS_PER_PAGE']);