Browse Source

mail fixes

pull/946/head
Alexey Makhov 10 years ago
parent
commit
2eadaf4131
  1. 5
      models/migrations/migrations.go
  2. 2
      modules/mailer/mail.go

5
models/migrations/migrations.go

@ -56,12 +56,13 @@ func expiredMigration(x *xorm.Engine) error {
func prepareToCommitComments(x *xorm.Engine) error {
sql := `ALTER TABLE comment MODIFY commit_id VARCHAR(50) DEFAULT NULL`
sql := `ALTER TABLE comment MODIFY commit_id VARCHAR(50) NULL DEFAULT NULL`
_, err := x.Exec(sql)
if err != nil {
return err
}
sql = `ALTER TABLE comment MODIFY line VARCHAR(50) DEFAULT NULL;`
sql = `ALTER TABLE comment MODIFY line VARCHAR(50) NULL DEFAULT NULL;`
_, err = x.Exec(sql)
if err != nil {
return err

2
modules/mailer/mail.go

@ -222,6 +222,7 @@ func SendIssueMentionMail(r macaron.Render, u, owner *models.User,
data := GetMailTmplData(nil)
data["IssueLink"] = fmt.Sprintf("%s/%s/issues/%d", owner.Name, repo.Name, issue.Index)
data["Subject"] = subject
data["ActUserName"] = u.Name
body, err := r.HTMLString(string(NOTIFY_MENTION), data)
if err != nil {
@ -246,6 +247,7 @@ func SendCommentMentionMail(r macaron.Render, u, owner *models.User,
data := GetMailTmplData(nil)
data["IssueLink"] = fmt.Sprintf("%s/%s/commit/%s", owner.Name, repo.Name, comment.CommitId)
data["Subject"] = subject
data["ActUserName"] = u.Name
body, err := r.HTMLString(string(NOTIFY_MENTION), data)
if err != nil {

Loading…
Cancel
Save