diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 0ab1c9e42..32c198f2f 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -55,36 +55,34 @@ func Create(ctx *middleware.Context, form auth.CreateRepoForm) { ctx.Handle(200, "repo.Create", err) } -func Import(ctx *middleware.Context, form auth.CreateRepoForm) { - ctx.Data["Title"] = "Import repository" +func Mirror(ctx *middleware.Context, form auth.CreateRepoForm) { + ctx.Data["Title"] = "Mirror repository" ctx.Data["PageIsNewRepo"] = true // For navbar arrow. - ctx.Data["LanguageIgns"] = models.LanguageIgns - ctx.Data["Licenses"] = models.Licenses if ctx.Req.Method == "GET" { - ctx.HTML(200, "repo/import") + ctx.HTML(200, "repo/mirror") return } if ctx.HasError() { - ctx.HTML(200, "repo/import") + ctx.HTML(200, "repo/mirror") return } _, err := models.CreateRepository(ctx.User, form.RepoName, form.Description, - form.Language, form.License, form.Visibility == "private", form.InitReadme == "on") + "", form.License, form.Visibility == "private", false) if err == nil { log.Trace("%s Repository created: %s/%s", ctx.Req.RequestURI, ctx.User.LowerName, form.RepoName) ctx.Redirect("/" + ctx.User.Name + "/" + form.RepoName) return } else if err == models.ErrRepoAlreadyExist { - ctx.RenderWithErr("Repository name has already been used", "repo/import", &form) + ctx.RenderWithErr("Repository name has already been used", "repo/mirror", &form) return } else if err == models.ErrRepoNameIllegal { - ctx.RenderWithErr(models.ErrRepoNameIllegal.Error(), "repo/import", &form) + ctx.RenderWithErr(models.ErrRepoNameIllegal.Error(), "repo/mirror", &form) return } - ctx.Handle(200, "repo.Import", err) + ctx.Handle(200, "repo.Mirror", err) } func Single(ctx *middleware.Context, params martini.Params) { diff --git a/templates/repo/import.tmpl b/templates/repo/mirror.tmpl similarity index 72% rename from templates/repo/import.tmpl rename to templates/repo/mirror.tmpl index 75d928d13..c69f47a30 100644 --- a/templates/repo/import.tmpl +++ b/templates/repo/mirror.tmpl @@ -16,7 +16,7 @@