...
|
...
|
@@ -96,7 +96,7 @@ func (a ArticleShow) Named() string { |
|
|
}
|
|
|
|
|
|
// 设置文章的备份数据
|
|
|
func (m *Article) MakeBackup(operator UserSimple, section []*ArticleSection) *ArticleBackup {
|
|
|
func (m *Article) MakeBackup(operator UserSimple, section []*ArticleSection, action string) *ArticleBackup {
|
|
|
sectionBackup := make([]ArticleSection, len(section))
|
|
|
for i := range section {
|
|
|
sectionBackup[i] = *section[i]
|
...
|
...
|
@@ -114,7 +114,7 @@ func (m *Article) MakeBackup(operator UserSimple, section []*ArticleSection) *Ar |
|
|
Section: sectionBackup,
|
|
|
Images: make([]Image, len(m.Images)),
|
|
|
Videos: make([]Video, len(m.Videos)),
|
|
|
Action: "",
|
|
|
Action: action,
|
|
|
TargetUser: m.TargetUser,
|
|
|
WhoRead: m.WhoRead,
|
|
|
WhoReview: m.WhoReview,
|
...
|
...
|
@@ -122,6 +122,9 @@ func (m *Article) MakeBackup(operator UserSimple, section []*ArticleSection) *Ar |
|
|
MatchUrl: map[string]string{},
|
|
|
Location: m.Location,
|
|
|
}
|
|
|
if action == "原始版本" {
|
|
|
b.ChangeField = append(b.ChangeField, "Section")
|
|
|
}
|
|
|
copy(b.Videos, m.Videos)
|
|
|
copy(b.Images, m.Images)
|
|
|
for k, v := range m.MatchUrl {
|
...
|
...
|
|