mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Support for opening file history on the doc tree https://github.com/siyuan-note/siyuan/issues/8448
This commit is contained in:
parent
5f8b71f566
commit
572951e8d4
1 changed files with 2 additions and 4 deletions
|
|
@ -370,7 +370,7 @@ func buildSearchHistoryQueryFilter(query, op, box, table string, typ int) (stmt
|
||||||
case HistoryTypeDoc:
|
case HistoryTypeDoc:
|
||||||
stmt += table + " MATCH '{title content}:(" + query + ")'"
|
stmt += table + " MATCH '{title content}:(" + query + ")'"
|
||||||
case HistoryTypeDocID:
|
case HistoryTypeDocID:
|
||||||
stmt += table + " id = '" + query + "'"
|
stmt += " id = '" + query + "'"
|
||||||
case HistoryTypeAsset:
|
case HistoryTypeAsset:
|
||||||
stmt += table + " MATCH '{title content}:(" + query + ")'"
|
stmt += table + " MATCH '{title content}:(" + query + ")'"
|
||||||
}
|
}
|
||||||
|
|
@ -378,14 +378,12 @@ func buildSearchHistoryQueryFilter(query, op, box, table string, typ int) (stmt
|
||||||
stmt += "1=1"
|
stmt += "1=1"
|
||||||
}
|
}
|
||||||
|
|
||||||
if HistoryTypeDocName == typ || HistoryTypeDoc == typ || HistoryTypeDocID == typ {
|
if HistoryTypeDocName == typ || HistoryTypeDoc == typ {
|
||||||
if "all" != op {
|
if "all" != op {
|
||||||
stmt += " AND op = '" + op + "'"
|
stmt += " AND op = '" + op + "'"
|
||||||
}
|
}
|
||||||
if HistoryTypeDocName == typ || HistoryTypeDoc == typ {
|
if HistoryTypeDocName == typ || HistoryTypeDoc == typ {
|
||||||
stmt += " AND path LIKE '%/" + box + "/%' AND path LIKE '%.sy'"
|
stmt += " AND path LIKE '%/" + box + "/%' AND path LIKE '%.sy'"
|
||||||
} else if HistoryTypeDocID == typ {
|
|
||||||
stmt += " AND id = '" + query + "'"
|
|
||||||
}
|
}
|
||||||
} else if HistoryTypeAsset == typ {
|
} else if HistoryTypeAsset == typ {
|
||||||
stmt += " AND path LIKE '%/assets/%'"
|
stmt += " AND path LIKE '%/assets/%'"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue