aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/explore
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-03-02 23:30:14 +0800
committerGitHub <noreply@github.com>2022-03-02 16:30:14 +0100
commitdd712b77f7ccc0e3c3f1872c96dc120c20af0b08 (patch)
tree6b96634aa6fed42ee7d5ab2862a3f48b8ddafd64 /routers/web/explore
parenta14b6f3aae196b2506e07f1dcfcd38d338b91e68 (diff)
downloadgitea-dd712b77f7ccc0e3c3f1872c96dc120c20af0b08.tar.gz
gitea-dd712b77f7ccc0e3c3f1872c96dc120c20af0b08.zip
Refactor admin user filter query parameters (#18965)
Only pass `status_filter` on admin page Use a more general method to pass query parameters, remove hard-coded keys
Diffstat (limited to 'routers/web/explore')
-rw-r--r--routers/web/explore/user.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/web/explore/user.go b/routers/web/explore/user.go
index c3aa89e8e6..98788f5433 100644
--- a/routers/web/explore/user.go
+++ b/routers/web/explore/user.go
@@ -82,7 +82,9 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions,
pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5)
pager.SetDefaultParams(ctx)
- pager.SetUserFilterParams(ctx)
+ for paramKey, paramVal := range opts.ExtraParamStrings {
+ pager.AddParamString(paramKey, paramVal)
+ }
ctx.Data["Page"] = pager
ctx.HTML(http.StatusOK, tplName)