Fix pagination limit parameter problem (#21109)

In commits list can use limit parameter to change, but pagination number
is wrong
tokarchuk/v1.18
Tyrone Yeh 2 years ago committed by GitHub
parent 52c2ef7902
commit ebafb4b575
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      routers/web/repo/commit.go

@ -83,7 +83,7 @@ func Commits(ctx *context.Context) {
ctx.Data["CommitCount"] = commitsCount ctx.Data["CommitCount"] = commitsCount
ctx.Data["RefName"] = ctx.Repo.RefName 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) pager.SetDefaultParams(ctx)
ctx.Data["Page"] = pager ctx.Data["Page"] = pager

Loading…
Cancel
Save