diff options
Diffstat (limited to 'application/bookmark/BookmarkFilter.php')
-rw-r--r-- | application/bookmark/BookmarkFilter.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/application/bookmark/BookmarkFilter.php b/application/bookmark/BookmarkFilter.php index 5d8733dc..db83c51c 100644 --- a/application/bookmark/BookmarkFilter.php +++ b/application/bookmark/BookmarkFilter.php | |||
@@ -150,7 +150,7 @@ class BookmarkFilter | |||
150 | return $this->bookmarks; | 150 | return $this->bookmarks; |
151 | } | 151 | } |
152 | 152 | ||
153 | $out = array(); | 153 | $out = []; |
154 | foreach ($this->bookmarks as $key => $value) { | 154 | foreach ($this->bookmarks as $key => $value) { |
155 | if ($value->isPrivate() && $visibility === 'private') { | 155 | if ($value->isPrivate() && $visibility === 'private') { |
156 | $out[$key] = $value; | 156 | $out[$key] = $value; |
@@ -395,7 +395,7 @@ class BookmarkFilter | |||
395 | $search = $link->getTagsString($tagsSeparator); | 395 | $search = $link->getTagsString($tagsSeparator); |
396 | if (strlen(trim($link->getDescription())) && strpos($link->getDescription(), '#') !== false) { | 396 | if (strlen(trim($link->getDescription())) && strpos($link->getDescription(), '#') !== false) { |
397 | // description given and at least one possible tag found | 397 | // description given and at least one possible tag found |
398 | $descTags = array(); | 398 | $descTags = []; |
399 | // find all tags in the form of #tag in the description | 399 | // find all tags in the form of #tag in the description |
400 | preg_match_all( | 400 | preg_match_all( |
401 | '/(?<![' . self::$HASHTAG_CHARS . '])#([' . self::$HASHTAG_CHARS . ']+?)\b/sm', | 401 | '/(?<![' . self::$HASHTAG_CHARS . '])#([' . self::$HASHTAG_CHARS . ']+?)\b/sm', |
@@ -552,10 +552,10 @@ class BookmarkFilter | |||
552 | protected function buildFullTextSearchableLink(Bookmark $link, array &$lengths): string | 552 | protected function buildFullTextSearchableLink(Bookmark $link, array &$lengths): string |
553 | { | 553 | { |
554 | $tagString = $link->getTagsString($this->conf->get('general.tags_separator', ' ')); | 554 | $tagString = $link->getTagsString($this->conf->get('general.tags_separator', ' ')); |
555 | $content = mb_convert_case($link->getTitle(), MB_CASE_LOWER, 'UTF-8') .'\\'; | 555 | $content = mb_convert_case($link->getTitle(), MB_CASE_LOWER, 'UTF-8') . '\\'; |
556 | $content .= mb_convert_case($link->getDescription(), MB_CASE_LOWER, 'UTF-8') .'\\'; | 556 | $content .= mb_convert_case($link->getDescription(), MB_CASE_LOWER, 'UTF-8') . '\\'; |
557 | $content .= mb_convert_case($link->getUrl(), MB_CASE_LOWER, 'UTF-8') .'\\'; | 557 | $content .= mb_convert_case($link->getUrl(), MB_CASE_LOWER, 'UTF-8') . '\\'; |
558 | $content .= mb_convert_case($tagString, MB_CASE_LOWER, 'UTF-8') .'\\'; | 558 | $content .= mb_convert_case($tagString, MB_CASE_LOWER, 'UTF-8') . '\\'; |
559 | 559 | ||
560 | $lengths['title'] = ['start' => 0, 'end' => mb_strlen($link->getTitle())]; | 560 | $lengths['title'] = ['start' => 0, 'end' => mb_strlen($link->getTitle())]; |
561 | $nextField = $lengths['title']['end'] + 1; | 561 | $nextField = $lengths['title']['end'] + 1; |