diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-23 12:16:17 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-23 12:16:17 -0400 |
commit | f8cfb81fb027313e45b8ce505200f3d48b306fe2 (patch) | |
tree | 130d0f5a0adf638eedb4f9555954254d2747f48c /routers | |
parent | b31070faf5ab73955585e4962d809be11098d767 (diff) | |
download | gitea-f8cfb81fb027313e45b8ce505200f3d48b306fe2.tar.gz gitea-f8cfb81fb027313e45b8ce505200f3d48b306fe2.zip |
Mirror updates
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/issue.go | 4 | ||||
-rw-r--r-- | routers/repo/repo.go | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 78fe4b25d0..a9d8799314 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -31,6 +31,10 @@ func Issues(ctx *middleware.Context, params martini.Params) { return } + if len(params["branchname"]) == 0 { + params["branchname"] = "master" + } + ctx.Data["Branchname"] = params["branchname"] ctx.HTML(200, "repo/issues") } diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 82956098b7..b05ce4a717 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -69,7 +69,10 @@ func Branches(ctx *middleware.Context, params martini.Params) { ctx.Data["Username"] = params["username"] ctx.Data["Reponame"] = params["reponame"] - ctx.Data["Branchname"] = brs[0] + if len(params["branchname"]) == 0 { + params["branchname"] = "master" + } + ctx.Data["Branchname"] = params["branchname"] ctx.Data["Branches"] = brs ctx.Data["IsRepoToolbarBranches"] = true @@ -334,8 +337,13 @@ func Commits(ctx *middleware.Context, params martini.Params) { ctx.HTML(200, "repo/commits") } -func Pulls(ctx *middleware.Context) { +func Pulls(ctx *middleware.Context, params martini.Params) { ctx.Data["IsRepoToolbarPulls"] = true + if len(params["branchname"]) == 0 { + params["branchname"] = "master" + } + + ctx.Data["Branchname"] = params["branchname"] ctx.HTML(200, "repo/pulls") } |