Skip to content

Commit

Permalink
🎨 搜索结果显示数 最小限制为 32 #7384
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Feb 16, 2023
1 parent f4f08b1 commit 5ca70f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/api/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ func setSearch(c *gin.Context) {
return
}

if 1 > s.Limit {
s.Limit = 64
if 32 > s.Limit {
s.Limit = 32
}

oldCaseSensitive := model.Conf.Search.CaseSensitive
Expand Down
3 changes: 3 additions & 0 deletions kernel/model/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ func InitConf() {
if 1 > Conf.Search.Limit {
Conf.Search.Limit = 64
}
if 32 > Conf.Search.Limit {
Conf.Search.Limit = 32
}
if 1 > Conf.Search.BacklinkMentionKeywordsLimit {
Conf.Search.BacklinkMentionKeywordsLimit = 512
}
Expand Down

0 comments on commit 5ca70f5

Please sign in to comment.