aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorfeula <mr.pikzen@gmail.com>2015-03-29 17:31:34 +0200
committerfeula <mr.pikzen@gmail.com>2015-03-29 17:31:38 +0200
commit3ea318dad05954e2043d5bb2f8572b103d7c3930 (patch)
tree26738100dc0f9fd7e8edadd0e0a7e132ad26e1ec
parent129ff3c2e50154d563de12c85ec7597df5bded5a (diff)
downloadShaarli-3ea318dad05954e2043d5bb2f8572b103d7c3930.tar.gz
Shaarli-3ea318dad05954e2043d5bb2f8572b103d7c3930.tar.zst
Shaarli-3ea318dad05954e2043d5bb2f8572b103d7c3930.zip
Display notes as absolute urls.
The deletion is related to Windows not handling quotes in filenames, see #179. It shouldn't delete the real file. Probably. Check it out.
-rw-r--r--doc/Mentions-of-Shaarli-in-"the-press".md3
-rw-r--r--index.php24
2 files changed, 17 insertions, 10 deletions
diff --git a/doc/Mentions-of-Shaarli-in-"the-press".md b/doc/Mentions-of-Shaarli-in-"the-press".md
deleted file mode 100644
index 60c22cf0..00000000
--- a/doc/Mentions-of-Shaarli-in-"the-press".md
+++ /dev/null
@@ -1,3 +0,0 @@
1This page lists the publications (physical or on the Internet) that mention Shaarli. It is by no means a complete list, and you are invited to add to it, should you spot a Shaarli mentioned in the wild.
2
3* http://www.linuxjournal.com/content/youre-boss-ubos \ No newline at end of file
diff --git a/index.php b/index.php
index 0d3c3301..eb7fd103 100644
--- a/index.php
+++ b/index.php
@@ -1940,15 +1940,25 @@ function buildLinkList($PAGE,$LINKSDB)
1940 while ($i<$end && $i<count($keys)) 1940 while ($i<$end && $i<count($keys))
1941 { 1941 {
1942 $link = $linksToDisplay[$keys[$i]]; 1942 $link = $linksToDisplay[$keys[$i]];
1943 $link['description']=nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description'])))); 1943 $title = $link['title'];
1944 $title=$link['title']; 1944 $taglist = explode(' ',$link['tags']);
1945 $classLi = $i%2!=0 ? '' : 'publicLinkHightLight';
1946 $link['class'] = ($link['private']==0 ? $classLi : 'private');
1947 $link['localdate']=linkdate2locale($link['linkdate']);
1948 $taglist = explode(' ',$link['tags']);
1949 uasort($taglist, 'strcasecmp'); 1945 uasort($taglist, 'strcasecmp');
1950 $link['taglist']=$taglist; 1946
1947 $classLi = $i%2!=0 ? '' : 'publicLinkHightLight'; // This could really be done with just a css pseudoclass.
1948
1949 $link['description'] = nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))));
1950 $link['class'] = ($link['private']==0 ? $classLi : 'private');
1951 $link['localdate'] = linkdate2locale($link['linkdate']);
1952 $link['taglist'] = $taglist;
1953
1954 // Convert notes to absolute URLs
1955 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.
1956 strlen($link["url"]) === 7) {
1957 $link["url"] = indexUrl() . $link["url"];
1958 }
1959
1951 $linkDisp[$keys[$i]] = $link; 1960 $linkDisp[$keys[$i]] = $link;
1961
1952 $i++; 1962 $i++;
1953 } 1963 }
1954 1964