diff options
Diffstat (limited to 'routers/web/repo')
-rw-r--r-- | routers/web/repo/issue.go | 4 | ||||
-rw-r--r-- | routers/web/repo/webhook.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 07dd98f1a5..f037c771d4 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -139,7 +139,7 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti viewType := ctx.FormString("type") sortType := ctx.FormString("sort") types := []string{"all", "your_repositories", "assigned", "created_by", "mentioned", "review_requested"} - if !util.IsStringInSlice(viewType, types, true) { + if !util.SliceContainsString(types, viewType, true) { viewType = "all" } @@ -3087,7 +3087,7 @@ func updateAttachments(ctx *context.Context, item interface{}, files []string) e return fmt.Errorf("unknown Type: %T", content) } for i := 0; i < len(attachments); i++ { - if util.IsStringInSlice(attachments[i].UUID, files) { + if util.SliceContainsString(files, attachments[i].UUID) { continue } if err := repo_model.DeleteAttachment(attachments[i], true); err != nil { diff --git a/routers/web/repo/webhook.go b/routers/web/repo/webhook.go index bf56e3d0bd..96261af674 100644 --- a/routers/web/repo/webhook.go +++ b/routers/web/repo/webhook.go @@ -110,7 +110,7 @@ func getOrgRepoCtx(ctx *context.Context) (*orgRepoCtx, error) { func checkHookType(ctx *context.Context) string { hookType := strings.ToLower(ctx.Params(":type")) - if !util.IsStringInSlice(hookType, setting.Webhook.Types, true) { + if !util.SliceContainsString(setting.Webhook.Types, hookType, true) { ctx.NotFound("checkHookType", nil) return "" } |