mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-06 20:55:10 +01:00
Find text in url and note too, apart from title
This commit is contained in:
@@ -461,8 +461,11 @@ def get_bookmarks(userkey, filtermethod=None, sortmethod=None):
|
||||
filter_note = True
|
||||
|
||||
if filter_text:
|
||||
bookmarks = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.title.contains(filter_text),
|
||||
Bookmark.status == Bookmark.VISIBLE).order_by(Bookmark.created_date.desc())
|
||||
bookmarks = Bookmark.select().where(
|
||||
Bookmark.userkey == userkey,
|
||||
(Bookmark.title.contains(filter_text) | Bookmark.url.contains(filter_text) | Bookmark.note.contains(filter_text)),
|
||||
Bookmark.status == Bookmark.VISIBLE
|
||||
).order_by(Bookmark.created_date.desc())
|
||||
elif filter_starred:
|
||||
bookmarks = Bookmark.select().where(Bookmark.userkey == userkey,
|
||||
Bookmark.starred).order_by(Bookmark.created_date.desc())
|
||||
|
||||
Reference in New Issue
Block a user