aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/explore/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/explore/repo.go')
-rw-r--r--routers/web/explore/repo.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/explore/repo.go b/routers/web/explore/repo.go
index e9efae5688..faac639caa 100644
--- a/routers/web/explore/repo.go
+++ b/routers/web/explore/repo.go
@@ -30,7 +30,7 @@ type RepoSearchOptions struct {
// RenderRepoSearch render repositories search page
func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
- page := ctx.QueryInt("page")
+ page := ctx.FormInt("page")
if page <= 0 {
page = 1
}
@@ -42,8 +42,8 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
orderBy models.SearchOrderBy
)
- ctx.Data["SortType"] = ctx.Query("sort")
- switch ctx.Query("sort") {
+ ctx.Data["SortType"] = ctx.Form("sort")
+ switch ctx.Form("sort") {
case "newest":
orderBy = models.SearchOrderByNewest
case "oldest":
@@ -73,8 +73,8 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
orderBy = models.SearchOrderByRecentUpdated
}
- keyword := strings.Trim(ctx.Query("q"), " ")
- topicOnly := ctx.QueryBool("topic")
+ keyword := strings.Trim(ctx.Form("q"), " ")
+ topicOnly := ctx.FormBool("topic")
ctx.Data["TopicOnly"] = topicOnly
repos, count, err = models.SearchRepository(&models.SearchRepoOptions{