summaryrefslogtreecommitdiffstats
path: root/modules/middleware
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-09-23 13:47:54 -0400
committerUnknwon <joe2010xtmf@163.com>2014-09-23 13:47:54 -0400
commita1109e6fbc31ec63cec50c3994e487a6bce27454 (patch)
tree49be1d99a706b4eea1931db678ee3c7a5adef259 /modules/middleware
parentebb05475ed15fffc37145799ce7c72b65ccdbfc5 (diff)
downloadgitea-a1109e6fbc31ec63cec50c3994e487a6bce27454.tar.gz
gitea-a1109e6fbc31ec63cec50c3994e487a6bce27454.zip
Page: Repository home page
Diffstat (limited to 'modules/middleware')
-rw-r--r--modules/middleware/repo.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index 7227e05de7..e447ee3a4d 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -168,6 +168,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
ctx.Handle(500, "GetTags", err)
return
}
+ ctx.Data["Tags"] = tags
ctx.Repo.Repository.NumTags = len(tags)
ctx.Data["Title"] = u.Name + "/" + repo.Name
@@ -251,6 +252,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
}
ctx.Data["IsBranch"] = ctx.Repo.IsBranch
+ ctx.Data["IsTag"] = ctx.Repo.IsTag
ctx.Data["IsCommit"] = ctx.Repo.IsCommit
ctx.Repo.CommitsCount, err = ctx.Repo.Commit.CommitsCount()
@@ -278,7 +280,8 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
ctx.Data["TagName"] = ctx.Repo.TagName
brs, err := ctx.Repo.GitRepo.GetBranches()
if err != nil {
- log.Error(4, "GetBranches: %v", err)
+ ctx.Handle(500, "GetBranches", err)
+ return
}
ctx.Data["Branches"] = brs
ctx.Data["BrancheCount"] = len(brs)