0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 07:43:18 -05:00

rename functions

This commit is contained in:
Unknwon 2015-08-10 22:45:49 +08:00
parent 75aff60c90
commit 884bc4ffd8
2 changed files with 6 additions and 6 deletions

View file

@ -400,8 +400,8 @@ func PairsContains(ius []*IssueUser, issueId, uid int64) int {
return -1 return -1
} }
// GetIssueUserPairs returns issue-user pairs by given repository and user. // GetIssueUsers returns issue-user pairs by given repository and user.
func GetIssueUserPairs(rid, uid int64, isClosed bool) ([]*IssueUser, error) { func GetIssueUsers(rid, uid int64, isClosed bool) ([]*IssueUser, error) {
ius := make([]*IssueUser, 0, 10) ius := make([]*IssueUser, 0, 10)
err := x.Where("is_closed=?", isClosed).Find(&ius, &IssueUser{RepoID: rid, UID: uid}) err := x.Where("is_closed=?", isClosed).Find(&ius, &IssueUser{RepoID: rid, UID: uid})
return ius, err return ius, err

View file

@ -114,14 +114,14 @@ func Issues(ctx *middleware.Context) {
issues, err := models.Issues(uid, assigneeID, repo.ID, posterID, milestoneID, issues, err := models.Issues(uid, assigneeID, repo.ID, posterID, milestoneID,
page, isShowClosed, filterMode == models.FM_MENTION, selectLabels, ctx.Query("sortType")) page, isShowClosed, filterMode == models.FM_MENTION, selectLabels, ctx.Query("sortType"))
if err != nil { if err != nil {
ctx.Handle(500, "GetIssues: %v", err) ctx.Handle(500, "Issues: %v", err)
return return
} }
// Get issue-user pairs. // Get issue-user relations.
pairs, err := models.GetIssueUserPairs(repo.ID, posterID, isShowClosed) pairs, err := models.GetIssueUsers(repo.ID, posterID, isShowClosed)
if err != nil { if err != nil {
ctx.Handle(500, "GetIssueUserPairs: %v", err) ctx.Handle(500, "GetIssueUsers: %v", err)
return return
} }