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.go21
1 files changed, 1 insertions, 20 deletions
diff --git a/routers/web/explore/repo.go b/routers/web/explore/repo.go
index c421aea715..cf3128314b 100644
--- a/routers/web/explore/repo.go
+++ b/routers/web/explore/repo.go
@@ -4,7 +4,6 @@
package explore
import (
- "fmt"
"net/http"
"code.gitea.io/gitea/models/db"
@@ -139,25 +138,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
pager := context.NewPagination(int(count), opts.PageSize, page, 5)
- pager.SetDefaultParams(ctx)
- pager.AddParamString("topic", fmt.Sprint(topicOnly))
- pager.AddParamString("language", language)
- pager.AddParamString(relevantReposOnlyParam, fmt.Sprint(opts.OnlyShowRelevant))
- if archived.Has() {
- pager.AddParamString("archived", fmt.Sprint(archived.Value()))
- }
- if fork.Has() {
- pager.AddParamString("fork", fmt.Sprint(fork.Value()))
- }
- if mirror.Has() {
- pager.AddParamString("mirror", fmt.Sprint(mirror.Value()))
- }
- if template.Has() {
- pager.AddParamString("template", fmt.Sprint(template.Value()))
- }
- if private.Has() {
- pager.AddParamString("private", fmt.Sprint(private.Value()))
- }
+ pager.AddParamFromRequest(ctx.Req)
ctx.Data["Page"] = pager
ctx.HTML(http.StatusOK, opts.TplName)