From 301c7ab1a079d937ab41c6f52b8804e5731008e6 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 28 Jul 2020 20:46:11 +0200 Subject: Better support for notes permalink --- application/bookmark/Bookmark.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/bookmark') 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 throw new InvalidBookmarkException($this); } if (empty($this->url)) { - $this->url = '?'. $this->shortUrl; + $this->url = '/shaare/'. $this->shortUrl; } if (empty($this->title)) { $this->title = $this->url; @@ -406,7 +406,7 @@ class Bookmark public function isNote() { // We check empty value to get a valid result if the link has not been saved yet - return empty($this->url) || $this->url[0] === '?'; + return empty($this->url) || startsWith($this->url, '/shaare/') || $this->url[0] === '?'; } /** -- cgit v1.2.3