Post.Edit of first post in thread changes thread title

main
Inga 🏳‍🌈 14 years ago
parent 5d9614cbf4
commit 613b46a204
  1. 2
      Builder/IISMainHandler/build.txt
  2. 2
      Builder/IISUploadHandler/build.txt
  3. 16
      Common/dataobjects/Post.cs

@ -236,7 +236,7 @@ namespace FLocal.Common.dataobjects {
actualLayer = this.layer;
}
lock(this.Edit_locker) {
ChangeSetUtil.ApplyChanges(
List<AbstractChange> changes = new List<AbstractChange> {
new InsertChange(
Revision.TableSpec.instance,
new Dictionary<string, AbstractFieldValue> {
@ -258,7 +258,19 @@ namespace FLocal.Common.dataobjects {
},
this.id
)
);
};
if(this.thread.firstPost.id == this.id) {
changes.Add(
new UpdateChange(
Thread.TableSpec.instance,
new Dictionary<string,AbstractFieldValue> {
{ TableSpec.FIELD_TITLE, new ScalarFieldValue(newTitle) },
},
this.thread.id
)
);
}
ChangeSetUtil.ApplyChanges(changes.ToArray());
}
}

Loading…
Cancel
Save