From 0457172f9bbd25697674622470b934934596993e Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 31 Aug 2022 00:00:21 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=95=B0=E6=8D=AE=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E6=94=AF=E6=8C=81=E5=8F=AA=E8=AF=BB=E5=8F=AF?= =?UTF-8?q?=E8=A7=86=E5=8C=96=E9=A2=84=E8=A7=88=20https://github.com/siyua?= =?UTF-8?q?n-note/siyuan/issues/5735?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/history.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/model/history.go b/kernel/model/history.go index 6eeb4d7be..28ddd02f6 100644 --- a/kernel/model/history.go +++ b/kernel/model/history.go @@ -279,11 +279,11 @@ func FullTextSearchHistory(query, box, op string, typ, page int) (ret []*History } else { stmt += "1=1" } - if "all" != op { - stmt += " AND op = '" + op + "'" - } if HistoryTypeDoc == typ { + if "all" != op { + stmt += " AND op = '" + op + "'" + } stmt += " AND path LIKE '%/" + box + "/%' AND path LIKE '%.sy'" } else if HistoryTypeAsset == typ { stmt += " AND path LIKE '%/assets/%'"