aboutsummaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2021-10-23 22:47:38 +0800
committerGitHub <noreply@github.com>2021-10-23 22:47:38 +0800
commit943dc087229aa922503eab7e49f4c63667dbb632 (patch)
tree093cba9ef2897aed1e68219e1b0eb8496faf47b8 /models/issue.go
parent6c49517cbd9d353d2d56d899632f301919818a03 (diff)
downloadgitea-943dc087229aa922503eab7e49f4c63667dbb632.tar.gz
gitea-943dc087229aa922503eab7e49f4c63667dbb632.zip
Fix issue content history problems, improve UI (#17404)
* Improve: make diff result better, make the HTML element fit the full height in the content history diff dialog * Bug fix: when edit the main issue, the poster is wrongly set to the issue poster
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/issue.go b/models/issue.go
index 823d82a765..a27bb1cc7d 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -804,7 +804,7 @@ func (issue *Issue) ChangeContent(doer *User, content string) (err error) {
return fmt.Errorf("UpdateIssueCols: %v", err)
}
- if err = issues.SaveIssueContentHistory(db.GetEngine(ctx), issue.PosterID, issue.ID, 0,
+ if err = issues.SaveIssueContentHistory(db.GetEngine(ctx), doer.ID, issue.ID, 0,
timeutil.TimeStampNow(), issue.Content, false); err != nil {
return fmt.Errorf("SaveIssueContentHistory: %v", err)
}
@@ -979,7 +979,7 @@ func newIssue(e db.Engine, doer *User, opts NewIssueOptions) (err error) {
return err
}
- if err = issues.SaveIssueContentHistory(e, opts.Issue.PosterID, opts.Issue.ID, 0,
+ if err = issues.SaveIssueContentHistory(e, doer.ID, opts.Issue.ID, 0,
timeutil.TimeStampNow(), opts.Issue.Content, true); err != nil {
return err
}