aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/search.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-07-29 09:42:15 +0800
committerGitHub <noreply@github.com>2021-07-29 03:42:15 +0200
commit33e0b38287fdc3487112062300b8dd3c95415ee7 (patch)
tree603394d8f303de1031c21da0d3d3a3cdc0b2bfda /routers/web/repo/search.go
parent370516883717de0e6e2087c12d368eb1465ee3b0 (diff)
downloadgitea-33e0b38287fdc3487112062300b8dd3c95415ee7.tar.gz
gitea-33e0b38287fdc3487112062300b8dd3c95415ee7.zip
Rename context.Query to context.Form (#16562)
Diffstat (limited to 'routers/web/repo/search.go')
-rw-r--r--routers/web/repo/search.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/repo/search.go b/routers/web/repo/search.go
index d9604bade0..6fbc4fb4d5 100644
--- a/routers/web/repo/search.go
+++ b/routers/web/repo/search.go
@@ -22,13 +22,13 @@ func Search(ctx *context.Context) {
ctx.Redirect(ctx.Repo.RepoLink, 302)
return
}
- language := strings.TrimSpace(ctx.Query("l"))
- keyword := strings.TrimSpace(ctx.Query("q"))
- page := ctx.QueryInt("page")
+ language := strings.TrimSpace(ctx.Form("l"))
+ keyword := strings.TrimSpace(ctx.Form("q"))
+ page := ctx.FormInt("page")
if page <= 0 {
page = 1
}
- queryType := strings.TrimSpace(ctx.Query("t"))
+ queryType := strings.TrimSpace(ctx.Form("t"))
isMatch := queryType == "match"
total, searchResults, searchResultLanguages, err := code_indexer.PerformSearch([]int64{ctx.Repo.Repository.ID},