mirror of
https://github.com/go-gitea/gitea
synced 2024-11-20 00:54:25 +00:00
Fix wrong paging on org members (#9990)
This commit is contained in:
parent
59510d6227
commit
8d51f28ba0
@ -13,7 +13,7 @@ import (
|
||||
// ListOptions options to paginate results
|
||||
type ListOptions struct {
|
||||
PageSize int
|
||||
Page int
|
||||
Page int // start from 1
|
||||
}
|
||||
|
||||
func (opts ListOptions) getPaginatedSession() *xorm.Session {
|
||||
|
@ -52,7 +52,7 @@ func Members(ctx *context.Context) {
|
||||
}
|
||||
|
||||
pager := context.NewPagination(int(total), setting.UI.MembersPagingNum, page, 5)
|
||||
opts.ListOptions.Page = (page - 1) * setting.UI.MembersPagingNum
|
||||
opts.ListOptions.Page = page
|
||||
opts.ListOptions.PageSize = setting.UI.MembersPagingNum
|
||||
members, membersIsPublic, err := models.FindOrgMembers(&opts)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user