From 613b46a204cf2db71c5584b5089927dea378f1b6 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Thu, 8 Jul 2010 15:34:42 +0000 Subject: [PATCH] Post.Edit of first post in thread changes thread title --- Builder/IISMainHandler/build.txt | 2 +- Builder/IISUploadHandler/build.txt | 2 +- Common/dataobjects/Post.cs | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index 4aeea8c..f874bfc 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -650 \ No newline at end of file +651 \ No newline at end of file diff --git a/Builder/IISUploadHandler/build.txt b/Builder/IISUploadHandler/build.txt index e41567f..1380537 100644 --- a/Builder/IISUploadHandler/build.txt +++ b/Builder/IISUploadHandler/build.txt @@ -1 +1 @@ -384 \ No newline at end of file +385 \ No newline at end of file diff --git a/Common/dataobjects/Post.cs b/Common/dataobjects/Post.cs index f4308aa..27e56e3 100644 --- a/Common/dataobjects/Post.cs +++ b/Common/dataobjects/Post.cs @@ -236,7 +236,7 @@ namespace FLocal.Common.dataobjects { actualLayer = this.layer; } lock(this.Edit_locker) { - ChangeSetUtil.ApplyChanges( + List changes = new List { new InsertChange( Revision.TableSpec.instance, new Dictionary { @@ -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 { + { TableSpec.FIELD_TITLE, new ScalarFieldValue(newTitle) }, + }, + this.thread.id + ) + ); + } + ChangeSetUtil.ApplyChanges(changes.ToArray()); } }