aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/bookmark/Bookmark.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-07-28 20:46:11 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-28 20:46:11 +0200
commit301c7ab1a079d937ab41c6f52b8804e5731008e6 (patch)
treeda6a5ed2a436fea87a3fe83fe72483c3f07c5826 /application/bookmark/Bookmark.php
parentb725eb047d233d6c7a505f160b57ebc399a24d45 (diff)
downloadShaarli-301c7ab1a079d937ab41c6f52b8804e5731008e6.tar.gz
Shaarli-301c7ab1a079d937ab41c6f52b8804e5731008e6.tar.zst
Shaarli-301c7ab1a079d937ab41c6f52b8804e5731008e6.zip
Better support for notes permalink
Diffstat (limited to 'application/bookmark/Bookmark.php')
-rw-r--r--application/bookmark/Bookmark.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/application/bookmark/Bookmark.php b/application/bookmark/Bookmark.php
index 90ff5b16..c6f2c515 100644
--- a/application/bookmark/Bookmark.php
+++ b/application/bookmark/Bookmark.php
@@ -106,7 +106,7 @@ class Bookmark
106 throw new InvalidBookmarkException($this); 106 throw new InvalidBookmarkException($this);
107 } 107 }
108 if (empty($this->url)) { 108 if (empty($this->url)) {
109 $this->url = '?'. $this->shortUrl; 109 $this->url = '/shaare/'. $this->shortUrl;
110 } 110 }
111 if (empty($this->title)) { 111 if (empty($this->title)) {
112 $this->title = $this->url; 112 $this->title = $this->url;
@@ -406,7 +406,7 @@ class Bookmark
406 public function isNote() 406 public function isNote()
407 { 407 {
408 // We check empty value to get a valid result if the link has not been saved yet 408 // We check empty value to get a valid result if the link has not been saved yet
409 return empty($this->url) || $this->url[0] === '?'; 409 return empty($this->url) || startsWith($this->url, '/shaare/') || $this->url[0] === '?';
410 } 410 }
411 411
412 /** 412 /**