Skip to content

Commit ebafb4b

Browse files
authored
Fix pagination limit parameter problem (#21109)
In commits list can use limit parameter to change, but pagination number is wrong
1 parent 52c2ef7 commit ebafb4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/repo/commit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func Commits(ctx *context.Context) {
8383
ctx.Data["CommitCount"] = commitsCount
8484
ctx.Data["RefName"] = ctx.Repo.RefName
8585

86-
pager := context.NewPagination(int(commitsCount), setting.Git.CommitsRangeSize, page, 5)
86+
pager := context.NewPagination(int(commitsCount), pageSize, page, 5)
8787
pager.SetDefaultParams(ctx)
8888
ctx.Data["Page"] = pager
8989

0 commit comments

Comments
 (0)