소스 검색

repo/commit: fix file commit history pagination (#4965)

- The `commits_table.tmpl` pagination uses a `$.FileName` variable in
  order to generate the next/previous URLs, but it seems like that
  variable was no longer being populated in `renderCommits`.
Douglas Thrift 7 년 전
부모
커밋
0bfce7aca4
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      routes/repo/commit.go

+ 1 - 0
routes/repo/commit.go

@@ -45,6 +45,7 @@ func RenderIssueLinks(oldCommits *list.List, repoLink string) *list.List {
 func renderCommits(c *context.Context, filename string) {
 	c.Data["Title"] = c.Tr("repo.commits.commit_history") + " · " + c.Repo.Repository.FullName()
 	c.Data["PageIsCommits"] = true
+	c.Data["FileName"] = filename
 
 	page := c.QueryInt("page")
 	if page < 1 {