mirror of
https://github.com/go-gitea/gitea
synced 2025-07-10 04:27:22 +00:00
Fix incorrect ref usages (#33301)
Fix #33297 By the way, improve some locales
This commit is contained in:
@ -62,11 +62,7 @@ func Commits(ctx *context.Context) {
|
||||
}
|
||||
ctx.Data["PageIsViewCode"] = true
|
||||
|
||||
commitsCount, err := ctx.Repo.GetCommitsCount()
|
||||
if err != nil {
|
||||
ctx.ServerError("GetCommitsCount", err)
|
||||
return
|
||||
}
|
||||
commitsCount := ctx.Repo.CommitsCount
|
||||
|
||||
page := ctx.FormInt("page")
|
||||
if page <= 1 {
|
||||
@ -129,12 +125,6 @@ func Graph(ctx *context.Context) {
|
||||
ctx.Data["SelectedBranches"] = realBranches
|
||||
files := ctx.FormStrings("file")
|
||||
|
||||
commitsCount, err := ctx.Repo.GetCommitsCount()
|
||||
if err != nil {
|
||||
ctx.ServerError("GetCommitsCount", err)
|
||||
return
|
||||
}
|
||||
|
||||
graphCommitsCount, err := ctx.Repo.GetCommitGraphsCount(ctx, hidePRRefs, realBranches, files)
|
||||
if err != nil {
|
||||
log.Warn("GetCommitGraphsCount error for generate graph exclude prs: %t branches: %s in %-v, Will Ignore branches and try again. Underlying Error: %v", hidePRRefs, branches, ctx.Repo.Repository, err)
|
||||
@ -171,7 +161,6 @@ func Graph(ctx *context.Context) {
|
||||
|
||||
ctx.Data["Username"] = ctx.Repo.Owner.Name
|
||||
ctx.Data["Reponame"] = ctx.Repo.Repository.Name
|
||||
ctx.Data["CommitCount"] = commitsCount
|
||||
|
||||
paginator := context.NewPagination(int(graphCommitsCount), setting.UI.GraphMaxCommitNum, page, 5)
|
||||
paginator.AddParamFromRequest(ctx.Req)
|
||||
|
Reference in New Issue
Block a user