]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Display notes as absolute URLs 183/head
authorFlorian Eula <mr.pikzen@gmail.com>
Wed, 1 Apr 2015 09:47:04 +0000 (11:47 +0200)
committerFlorian Eula <mr.pikzen@gmail.com>
Wed, 1 Apr 2015 09:47:04 +0000 (11:47 +0200)
index.php

index 9ab70f6c32a8d2946308b3c1ff1bff80341f6859..765416ec7e1b81fe04fb7a09f6e3c0d3b656cf3a 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1938,6 +1938,12 @@ function buildLinkList($PAGE,$LINKSDB)
         $taglist = explode(' ',$link['tags']);
         uasort($taglist, 'strcasecmp');
         $link['taglist']=$taglist;
+
+        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++;
     }