mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-21 17:24:10 +00:00
Let package git depend on setting but not opposite (#15241)
* Let package git depend on setting but not opposite * private some package variables
This commit is contained in:
parent
e673e42f7e
commit
e3c626834b
17 changed files with 113 additions and 92 deletions
|
@ -18,6 +18,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/repofiles"
|
||||
repo_module "code.gitea.io/gitea/modules/repository"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
"code.gitea.io/gitea/modules/web"
|
||||
"code.gitea.io/gitea/routers/utils"
|
||||
|
@ -62,8 +63,8 @@ func Branches(ctx *context.Context) {
|
|||
}
|
||||
|
||||
limit := ctx.QueryInt("limit")
|
||||
if limit <= 0 || limit > git.BranchesRangeSize {
|
||||
limit = git.BranchesRangeSize
|
||||
if limit <= 0 || limit > setting.Git.BranchesRangeSize {
|
||||
limit = setting.Git.BranchesRangeSize
|
||||
}
|
||||
|
||||
skip := (page - 1) * limit
|
||||
|
@ -73,7 +74,7 @@ func Branches(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
ctx.Data["Branches"] = branches
|
||||
pager := context.NewPagination(int(branchesCount), git.BranchesRangeSize, page, 5)
|
||||
pager := context.NewPagination(int(branchesCount), setting.Git.BranchesRangeSize, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue