Fix "issueReposQueryPattern does not match query" (#26556) (#26564)

Backport #26556 by @wolfogre

Fix
`https://github.com/go-gitea/gitea/pull/26545#discussion_r1295734340`

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot 2023-08-17 21:13:00 +08:00 committed by GitHub
parent 7da85fa0c3
commit 1cedf36d30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -695,7 +695,7 @@ func getRepoIDs(reposQuery string) []int64 {
return []int64{} return []int64{}
} }
if !issueReposQueryPattern.MatchString(reposQuery) { if !issueReposQueryPattern.MatchString(reposQuery) {
log.Warn("issueReposQueryPattern does not match query") log.Warn("issueReposQueryPattern does not match query: %q", reposQuery)
return []int64{} return []int64{}
} }

View file

@ -74,7 +74,7 @@
<form class="list-header-search ui form ignore-dirty"> <form class="list-header-search ui form ignore-dirty">
<div class="ui small search fluid action input"> <div class="ui small search fluid action input">
<input type="hidden" name="type" value="{{$.ViewType}}"> <input type="hidden" name="type" value="{{$.ViewType}}">
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]"> <input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}},{{end}}]">
<input type="hidden" name="sort" value="{{$.SortType}}"> <input type="hidden" name="sort" value="{{$.SortType}}">
<input type="hidden" name="state" value="{{$.State}}"> <input type="hidden" name="state" value="{{$.State}}">
<input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..."> <input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}...">