| @@ -511,25 +511,6 @@ func (issues IssueList) LoadComments() error { | |||||
| return issues.loadComments(x, builder.NewCond()) | return issues.loadComments(x, builder.NewCond()) | ||||
| } | } | ||||
| // LoadClosedComments loads discuss comments | |||||
| func (issues IssueList) LoadClosedComments() error { | |||||
| err := issues.loadComments(x, builder.Eq{"comment.type": CommentTypeClose}) | |||||
| if err == nil { | |||||
| for _, issue := range issues { | |||||
| if issue.Comments != nil { | |||||
| tmp := make([]*Comment, 0) | |||||
| tmp = append(tmp, issue.Comments[len(issue.Comments)-1]) | |||||
| issue.Comments = tmp | |||||
| for i, comm := range issue.Comments { | |||||
| fmt.Printf("comm load poster.i=" + fmt.Sprint(i)) | |||||
| comm.LoadPoster() | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| return err | |||||
| } | |||||
| // LoadDiscussComments loads discuss comments | // LoadDiscussComments loads discuss comments | ||||
| func (issues IssueList) LoadDiscussComments() error { | func (issues IssueList) LoadDiscussComments() error { | ||||
| return issues.loadComments(x, builder.Eq{"comment.type": CommentTypeComment}) | return issues.loadComments(x, builder.Eq{"comment.type": CommentTypeComment}) | ||||