From 884bc4ffd81f5b952df172d43ba7b16e1844ff19 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 10 Aug 2015 22:45:49 +0800 Subject: [PATCH] rename functions --- models/issue.go | 4 ++-- routers/repo/issue.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/models/issue.go b/models/issue.go index 940f72bea96..79363ce5ab0 100644 --- a/models/issue.go +++ b/models/issue.go @@ -400,8 +400,8 @@ func PairsContains(ius []*IssueUser, issueId, uid int64) int { return -1 } -// GetIssueUserPairs returns issue-user pairs by given repository and user. -func GetIssueUserPairs(rid, uid int64, isClosed bool) ([]*IssueUser, error) { +// GetIssueUsers returns issue-user pairs by given repository and user. +func GetIssueUsers(rid, uid int64, isClosed bool) ([]*IssueUser, error) { ius := make([]*IssueUser, 0, 10) err := x.Where("is_closed=?", isClosed).Find(&ius, &IssueUser{RepoID: rid, UID: uid}) return ius, err diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 659f0e8309f..9181d5bd4e0 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -114,14 +114,14 @@ func Issues(ctx *middleware.Context) { issues, err := models.Issues(uid, assigneeID, repo.ID, posterID, milestoneID, page, isShowClosed, filterMode == models.FM_MENTION, selectLabels, ctx.Query("sortType")) if err != nil { - ctx.Handle(500, "GetIssues: %v", err) + ctx.Handle(500, "Issues: %v", err) return } - // Get issue-user pairs. - pairs, err := models.GetIssueUserPairs(repo.ID, posterID, isShowClosed) + // Get issue-user relations. + pairs, err := models.GetIssueUsers(repo.ID, posterID, isShowClosed) if err != nil { - ctx.Handle(500, "GetIssueUserPairs: %v", err) + ctx.Handle(500, "GetIssueUsers: %v", err) return }