summaryrefslogtreecommitdiffstats
path: root/models/issue_comment.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r--models/issue_comment.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index 3ba6790216..2494467bf2 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -749,8 +749,12 @@ func CreateRefComment(doer *User, repo *Repository, issue *Issue, content, commi
// GetCommentByID returns the comment by given ID.
func GetCommentByID(id int64) (*Comment, error) {
+ return getCommentByID(x, id)
+}
+
+func getCommentByID(e Engine, id int64) (*Comment, error) {
c := new(Comment)
- has, err := x.ID(id).Get(c)
+ has, err := e.ID(id).Get(c)
if err != nil {
return nil, err
} else if !has {