From ebafb4b575c2c8300e827d92c33aae030093fedd Mon Sep 17 00:00:00 2001 From: Tyrone Yeh Date: Thu, 8 Sep 2022 23:56:14 +0800 Subject: [PATCH] Fix pagination limit parameter problem (#21109) In commits list can use limit parameter to change, but pagination number is wrong --- routers/web/repo/commit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/repo/commit.go b/routers/web/repo/commit.go index 164dc181f..a6553256b 100644 --- a/routers/web/repo/commit.go +++ b/routers/web/repo/commit.go @@ -83,7 +83,7 @@ func Commits(ctx *context.Context) { ctx.Data["CommitCount"] = commitsCount ctx.Data["RefName"] = ctx.Repo.RefName - pager := context.NewPagination(int(commitsCount), setting.Git.CommitsRangeSize, page, 5) + pager := context.NewPagination(int(commitsCount), pageSize, page, 5) pager.SetDefaultParams(ctx) ctx.Data["Page"] = pager