aboutsummaryrefslogtreecommitdiffstats
path: root/modules/context/pagination.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context/pagination.go')
-rw-r--r--modules/context/pagination.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/context/pagination.go b/modules/context/pagination.go
index 3effd88f10..5a88c92053 100644
--- a/modules/context/pagination.go
+++ b/modules/context/pagination.go
@@ -18,10 +18,11 @@ type Pagination struct {
urlParams []string
}
-// NewPagination creates a new instance of the Pagination struct
-func NewPagination(total, page, issueNum, numPages int) *Pagination {
+// NewPagination creates a new instance of the Pagination struct.
+// "pagingNum" is "page size" or "limit", "current" is "page"
+func NewPagination(total, pagingNum, current, numPages int) *Pagination {
p := &Pagination{}
- p.Paginater = paginator.New(total, page, issueNum, numPages)
+ p.Paginater = paginator.New(total, pagingNum, current, numPages)
return p
}