From a1f7db70d14bcf0f069ed53a334da722d31bd15c Mon Sep 17 00:00:00 2001 From: Alexei Bezborodov Date: Fri, 5 Aug 2022 15:51:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=81=D0=B5=20=D0=BF=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D0=B8=20=D0=B2=D0=B8?= =?UTF-8?q?=D0=B4=D0=BD=D1=8B=20=D0=BD=D0=B0=20=D0=BA=D0=B0=D1=80=D1=82?= =?UTF-8?q?=D0=B5=20#77?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/web/map/umap.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/routers/web/map/umap.go b/routers/web/map/umap.go index e8dc3203a0..e53e84ae13 100644 --- a/routers/web/map/umap.go +++ b/routers/web/map/umap.go @@ -38,6 +38,7 @@ func isKeywordValid(keyword string) bool { // RenderUserSearch render user search page func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions, tplName base.TplName) { + opts.PageSize = 8 * 1024 // Get all users opts.Page = ctx.FormInt("page") if opts.Page <= 1 { opts.Page = 1 @@ -102,13 +103,6 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions, ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled - pager := context.NewPagination(int(count), 8 * 1024, opts.Page, 5) - pager.SetDefaultParams(ctx) - for paramKey, paramVal := range opts.ExtraParamStrings { - pager.AddParamString(paramKey, paramVal) - } - ctx.Data["Page"] = pager - ctx.HTML(http.StatusOK, tplName) }