diff options
Diffstat (limited to 'routers/web/repo/setting.go')
-rw-r--r-- | routers/web/repo/setting.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/repo/setting.go b/routers/web/repo/setting.go index c1c49e8ac6..2f15610737 100644 --- a/routers/web/repo/setting.go +++ b/routers/web/repo/setting.go @@ -70,7 +70,7 @@ func SettingsPost(ctx *context.Context) { repo := ctx.Repo.Repository - switch ctx.Form("action") { + switch ctx.FormString("action") { case "update": if ctx.HasError() { ctx.HTML(http.StatusOK, tplSettingsOptions) @@ -560,7 +560,7 @@ func SettingsPost(ctx *context.Context) { return } - newOwner, err := models.GetUserByName(ctx.Form("new_owner_name")) + newOwner, err := models.GetUserByName(ctx.FormString("new_owner_name")) if err != nil { if models.IsErrUserNotExist(err) { ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_owner_name"), tplSettingsOptions, nil) @@ -775,7 +775,7 @@ func Collaboration(ctx *context.Context) { // CollaborationPost response for actions for a collaboration of a repository func CollaborationPost(ctx *context.Context) { - name := utils.RemoveUsernameParameterSuffix(strings.ToLower(ctx.Form("collaborator"))) + name := utils.RemoveUsernameParameterSuffix(strings.ToLower(ctx.FormString("collaborator"))) if len(name) == 0 || ctx.Repo.Owner.LowerName == name { ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) return @@ -854,7 +854,7 @@ func AddTeamPost(ctx *context.Context) { return } - name := utils.RemoveUsernameParameterSuffix(strings.ToLower(ctx.Form("team"))) + name := utils.RemoveUsernameParameterSuffix(strings.ToLower(ctx.FormString("team"))) if len(name) == 0 { ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") return @@ -988,7 +988,7 @@ func GitHooksEditPost(ctx *context.Context) { } return } - hook.Content = ctx.Form("content") + hook.Content = ctx.FormString("content") if err = hook.Update(); err != nil { ctx.ServerError("hook.Update", err) return |