summaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-13 23:21:43 +0800
committerUnknwon <u@gogs.io>2015-08-13 23:21:43 +0800
commit1fb53067f478414302096d5d976a3db85df9e2eb (patch)
treeb1b8ba83989fe5edd346a26c6bd0068abbb4d533 /models/issue.go
parent0ec7d1539b177dbe55f3c68691b0c9f8e35193a9 (diff)
downloadgitea-1fb53067f478414302096d5d976a3db85df9e2eb.tar.gz
gitea-1fb53067f478414302096d5d976a3db85df9e2eb.zip
finish close/reopen issue
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go21
1 files changed, 14 insertions, 7 deletions
diff --git a/models/issue.go b/models/issue.go
index f32f054584..174e3102d9 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -798,7 +798,7 @@ func GetLabelsByIssueID(issueID int64) ([]*Label, error) {
}
func updateLabel(e Engine, l *Label) error {
- _, err := x.Id(l.ID).AllCols().Update(l)
+ _, err := e.Id(l.ID).AllCols().Update(l)
return err
}
@@ -1222,11 +1222,13 @@ const (
COMMENT_TYPE_CLOSE
// References.
- COMMENT_TYPE_ISSUE
- // Reference from some commit (not part of a pull request)
- COMMENT_TYPE_COMMIT
- // Reference from some pull request
- COMMENT_TYPE_PULL
+ COMMENT_TYPE_ISSUE_REF
+ // Reference from a commit (not part of a pull request)
+ COMMENT_TYPE_COMMIT_REF
+ // Reference from a comment
+ COMMENT_TYPE_COMMENT_REF
+ // Reference from a pull request
+ COMMENT_TYPE_PULL_REF
)
// Comment represents a comment in commit and issue page.
@@ -1245,11 +1247,16 @@ type Comment struct {
Attachments []*Attachment `xorm:"-"`
}
-// HashTag returns unique hash tag for issue.
+// HashTag returns unique hash tag for comment.
func (c *Comment) HashTag() string {
return "issuecomment-" + com.ToStr(c.ID)
}
+// EventTag returns unique event hash tag for comment.
+func (c *Comment) EventTag() string {
+ return "event-" + com.ToStr(c.ID)
+}
+
func (c *Comment) AfterSet(colName string, _ xorm.Cell) {
var err error
switch colName {