Removed unused DependentIssue in Comment struct
Signed-off-by: Konrad <konrad@kola-entertainments.de>
This commit is contained in:
parent
62efeba087
commit
de45d094fa
|
|
@ -97,7 +97,6 @@ type Comment struct {
|
||||||
OldTitle string
|
OldTitle string
|
||||||
NewTitle string
|
NewTitle string
|
||||||
DependentIssueID int64
|
DependentIssueID int64
|
||||||
DependentIssue *Issue `xorm:"-"`
|
|
||||||
|
|
||||||
CommitID int64
|
CommitID int64
|
||||||
Line int64
|
Line int64
|
||||||
|
|
@ -275,18 +274,6 @@ func (c *Comment) LoadAssignees() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadDepIssueDetails loads Dependent Issue Details
|
|
||||||
func (c *Comment) LoadDepIssueDetails() error {
|
|
||||||
var err error
|
|
||||||
if c.DependentIssueID > 0 {
|
|
||||||
c.DependentIssue, err = getIssueByID(x, c.DependentIssueID)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MailParticipants sends new comment emails to repository watchers
|
// MailParticipants sends new comment emails to repository watchers
|
||||||
// and mentioned people.
|
// and mentioned people.
|
||||||
func (c *Comment) MailParticipants(e Engine, opType ActionType, issue *Issue) (err error) {
|
func (c *Comment) MailParticipants(e Engine, opType ActionType, issue *Issue) (err error) {
|
||||||
|
|
@ -337,7 +324,6 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
|
||||||
Content: opts.Content,
|
Content: opts.Content,
|
||||||
OldTitle: opts.OldTitle,
|
OldTitle: opts.OldTitle,
|
||||||
NewTitle: opts.NewTitle,
|
NewTitle: opts.NewTitle,
|
||||||
DependentIssue: opts.DependentIssue,
|
|
||||||
DependentIssueID: depID,
|
DependentIssueID: depID,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ import (
|
||||||
"code.gitea.io/gitea/modules/notification"
|
"code.gitea.io/gitea/modules/notification"
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
"code.gitea.io/gitea/modules/util"
|
"code.gitea.io/gitea/modules/util"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
@ -684,11 +683,6 @@ func ViewIssue(ctx *context.Context) {
|
||||||
ctx.Handle(500, "LoadAssignees", err)
|
ctx.Handle(500, "LoadAssignees", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else if comment.Type == models.CommentTypeRemoveDependency || comment.Type == models.CommentTypeAddDependency {
|
|
||||||
if err = comment.LoadDepIssueDetails(); err != nil {
|
|
||||||
ctx.Handle(http.StatusInternalServerError, "LoadDepIssueDetails", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user