]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - index.php
update doc
[github/shaarli/Shaarli.git] / index.php
index 0d3c33011d146b69481766e649a7c5fdeb1fcbe3..83c507bbd64581800c664d6ff62eaa8271233651 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1940,14 +1940,21 @@ function buildLinkList($PAGE,$LINKSDB)
     while ($i<$end && $i<count($keys))
     {
         $link = $linksToDisplay[$keys[$i]];
+        $title               = $link['title'];
+        $taglist             = explode(' ',$link['tags']);
+        uasort($taglist, 'strcasecmp');
+        $classLi             = $i%2!=0 ? '' : 'publicLinkHightLight'; // This could really be done with just a css pseudoclass.
         $link['description']=nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))));
-        $title=$link['title'];
-        $classLi =  $i%2!=0 ? '' : 'publicLinkHightLight';
         $link['class'] = ($link['private']==0 ? $classLi : 'private');
-        $link['localdate']=linkdate2locale($link['linkdate']);
-        $taglist = explode(' ',$link['tags']);
-        uasort($taglist, 'strcasecmp');
+        $link['timestamp']=linkdate2timestamp($link['linkdate']);
         $link['taglist']=$taglist;
+
+        // Convert notes to absolute URLs
+        if ($link["url"][0]      === '?' && // Check for both signs of a note: starting with ? and 7 chars long. I doubt that you'll post any links that look like this.
+            strlen($link["url"]) === 7) {
+            $link["url"] = indexUrl() . $link["url"];
+        }
+
         $linkDisp[$keys[$i]] = $link;
         $i++;
     }