diff options
author | Unknwon <joe2010xtmf@163.com> | 2015-02-11 12:43:43 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2015-02-11 12:43:43 -0500 |
commit | c7a042ef3682fce9f343faf5e8d3e4228feabb96 (patch) | |
tree | 4f4f5c295c57930f3a019d4cf7ad84a8d34ef1c8 /routers/repo/issue.go | |
parent | 767bf82eabed0fede7bbdb5f5b1c75898c6ff00d (diff) | |
parent | e805fdb29cdf8ceabe271a5f26472ae1dc34abff (diff) | |
download | gitea-c7a042ef3682fce9f343faf5e8d3e4228feabb96.tar.gz gitea-c7a042ef3682fce9f343faf5e8d3e4228feabb96.zip |
Merge branch 'access' of github.com:gogits/gogs into access
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r-- | routers/repo/issue.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 3e0206dafb..bf39d9aba6 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -174,7 +174,7 @@ func CreateIssue(ctx *middleware.Context) { return } - us, err := models.GetCollaborators(strings.TrimPrefix(ctx.Repo.RepoLink, "/")) + us, err := ctx.Repo.Repository.GetCollaborators() if err != nil { ctx.Handle(500, "issue.CreateIssue(GetCollaborators)", err) return @@ -218,7 +218,7 @@ func CreateIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) { return } - _, err = models.GetCollaborators(strings.TrimPrefix(ctx.Repo.RepoLink, "/")) + _, err = ctx.Repo.Repository.GetCollaborators() if err != nil { send(500, nil, err) return @@ -246,8 +246,8 @@ func CreateIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) { if err := models.NewIssue(issue); err != nil { send(500, nil, err) return - } else if err := models.NewIssueUserPairs(issue.RepoId, issue.Id, ctx.Repo.Owner.Id, - ctx.User.Id, form.AssigneeId, ctx.Repo.Repository.Name); err != nil { + } else if err := models.NewIssueUserPairs(ctx.Repo.Repository, issue.Id, ctx.Repo.Owner.Id, + ctx.User.Id, form.AssigneeId); err != nil { send(500, nil, err) return } @@ -384,7 +384,7 @@ func ViewIssue(ctx *middleware.Context) { } // Get all collaborators. - ctx.Data["Collaborators"], err = models.GetCollaborators(strings.TrimPrefix(ctx.Repo.RepoLink, "/")) + ctx.Data["Collaborators"], err = ctx.Repo.Repository.GetCollaborators() if err != nil { ctx.Handle(500, "issue.CreateIssue(GetCollaborators)", err) return |