diff options
Diffstat (limited to 'application/bookmark')
-rw-r--r-- | application/bookmark/BookmarkFileService.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/application/bookmark/BookmarkFileService.php b/application/bookmark/BookmarkFileService.php index a56cc92b..9c59e139 100644 --- a/application/bookmark/BookmarkFileService.php +++ b/application/bookmark/BookmarkFileService.php | |||
@@ -8,6 +8,7 @@ use Exception; | |||
8 | use Shaarli\Bookmark\Exception\BookmarkNotFoundException; | 8 | use Shaarli\Bookmark\Exception\BookmarkNotFoundException; |
9 | use Shaarli\Bookmark\Exception\EmptyDataStoreException; | 9 | use Shaarli\Bookmark\Exception\EmptyDataStoreException; |
10 | use Shaarli\Config\ConfigManager; | 10 | use Shaarli\Config\ConfigManager; |
11 | use Shaarli\Formatter\BookmarkMarkdownFormatter; | ||
11 | use Shaarli\History; | 12 | use Shaarli\History; |
12 | use Shaarli\Legacy\LegacyLinkDB; | 13 | use Shaarli\Legacy\LegacyLinkDB; |
13 | use Shaarli\Legacy\LegacyUpdater; | 14 | use Shaarli\Legacy\LegacyUpdater; |
@@ -130,7 +131,7 @@ class BookmarkFileService implements BookmarkServiceInterface | |||
130 | } | 131 | } |
131 | 132 | ||
132 | if ($visibility === null) { | 133 | if ($visibility === null) { |
133 | $visibility = $this->isLoggedIn ? 'all' : 'public'; | 134 | $visibility = $this->isLoggedIn ? BookmarkFilter::$ALL : BookmarkFilter::$PUBLIC; |
134 | } | 135 | } |
135 | 136 | ||
136 | $bookmark = $this->bookmarks[$id]; | 137 | $bookmark = $this->bookmarks[$id]; |
@@ -287,9 +288,13 @@ class BookmarkFileService implements BookmarkServiceInterface | |||
287 | $caseMapping = []; | 288 | $caseMapping = []; |
288 | foreach ($bookmarks as $bookmark) { | 289 | foreach ($bookmarks as $bookmark) { |
289 | foreach ($bookmark->getTags() as $tag) { | 290 | foreach ($bookmark->getTags() as $tag) { |
290 | if (empty($tag) || (! $this->isLoggedIn && startsWith($tag, '.'))) { | 291 | if (empty($tag) |
292 | || (! $this->isLoggedIn && startsWith($tag, '.')) | ||
293 | || $tag === BookmarkMarkdownFormatter::NO_MD_TAG | ||
294 | ) { | ||
291 | continue; | 295 | continue; |
292 | } | 296 | } |
297 | |||
293 | // The first case found will be displayed. | 298 | // The first case found will be displayed. |
294 | if (!isset($caseMapping[strtolower($tag)])) { | 299 | if (!isset($caseMapping[strtolower($tag)])) { |
295 | $caseMapping[strtolower($tag)] = $tag; | 300 | $caseMapping[strtolower($tag)] = $tag; |