aboutsummaryrefslogtreecommitdiff
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-10-11 18:02:48 -0400
committerUnknwon <joe2010xtmf@163.com>2014-10-11 18:02:48 -0400
commit963354c5d7e78eb9fed447ab9b9984420573649c (patch)
tree896956c024e2b26f6517ea1a8138d83a7964254f /routers
parent17c1bc73833a25a5841bc5ed344f343535bf1afc (diff)
Add raw, history file button, and other mirror fixes
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/commit.go4
-rw-r--r--routers/repo/view.go2
2 files changed, 4 insertions, 2 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go
index 4c5bcf0c..b2c2e0f9 100644
--- a/routers/repo/commit.go
+++ b/routers/repo/commit.go
@@ -276,13 +276,15 @@ func FileHistory(ctx *middleware.Context) {
nextPage = 0
}
- ctx.Data["Commits"], err = ctx.Repo.GitRepo.CommitsByFileAndRange(
+ commits, err := ctx.Repo.GitRepo.CommitsByFileAndRange(
branchName, fileName, page)
if err != nil {
ctx.Handle(500, "repo.FileHistory(CommitsByRange)", err)
return
}
+ commits = models.ValidateCommitsWithEmails(commits)
+ ctx.Data["Commits"] = commits
ctx.Data["Username"] = userName
ctx.Data["Reponame"] = repoName
ctx.Data["FileName"] = fileName
diff --git a/routers/repo/view.go b/routers/repo/view.go
index ba76a6ad..26fa0b4c 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -166,7 +166,7 @@ func Home(ctx *middleware.Context) {
}
if readmeFile != nil {
- ctx.Data["ReadmeInHome"] = true
+ ctx.Data["ReadmeInList"] = true
ctx.Data["ReadmeExist"] = true
if dataRc, err := readmeFile.Data(); err != nil {
ctx.Handle(404, "repo.SinglereadmeFile.LookupBlob", err)