diff options
author | Unknown <joe2010xtmf@163.com> | 2014-06-25 03:55:59 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-06-25 03:55:59 -0400 |
commit | 4cf7a1fca5ed22c4d46317477e6feab324fb337e (patch) | |
tree | f5fb6de2e5957ff3bbafbfadbf7e93ed83e74d8b /routers/repo/repo.go | |
parent | 80be0607350411662e0fc9b46e11388f5bb6cb54 (diff) | |
download | gitea-4cf7a1fca5ed22c4d46317477e6feab324fb337e.tar.gz gitea-4cf7a1fca5ed22c4d46317477e6feab324fb337e.zip |
Mirror update on create repo page
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r-- | routers/repo/repo.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 2ead24df36..6d24169926 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -36,6 +36,13 @@ func Create(ctx *middleware.Context) { ctx.Data["PageIsNewRepo"] = true ctx.Data["LanguageIgns"] = models.LanguageIgns ctx.Data["Licenses"] = models.Licenses + + if err := ctx.User.GetOrganizations(); err != nil { + ctx.Handle(500, "home.Dashboard(GetOrganizations)", err) + return + } + ctx.Data["Orgs"] = ctx.User.Orgs + ctx.HTML(200, CREATE) } @@ -45,6 +52,12 @@ func CreatePost(ctx *middleware.Context, form auth.CreateRepoForm) { ctx.Data["LanguageIgns"] = models.LanguageIgns ctx.Data["Licenses"] = models.Licenses + if err := ctx.User.GetOrganizations(); err != nil { + ctx.Handle(500, "home.Dashboard(GetOrganizations)", err) + return + } + ctx.Data["Orgs"] = ctx.User.Orgs + if ctx.HasError() { ctx.HTML(200, CREATE) return |