diff --git a/Common/Config.cs b/Common/Config.cs index ffbdab3..10e890d 100644 --- a/Common/Config.cs +++ b/Common/Config.cs @@ -37,6 +37,8 @@ namespace FLocal.Common { public readonly HashSet AdditionalHosts; + public readonly int MinPostId; + protected Config(NameValueCollection data) : base(data) { this.InitTime = DateTime.Now.ToLongTimeString(); this.mainConnection = new MySQLConnector.Connection(data["ConnectionString"], MySQLConnector.PostgresDBTraits.instance); @@ -52,6 +54,7 @@ namespace FLocal.Common { this.IsMigrationEnabled = parseBool(data["EnableMigration"]); this.BaseHost = data["BaseHost"]; this.AdditionalHosts = new HashSet(from host in data["AdditionalHosts"].Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries) select host.Trim()); + this.MinPostId = int.Parse(data["MinPostId"]); } public static void Init(NameValueCollection data) { diff --git a/Common/dataobjects/Thread.cs b/Common/dataobjects/Thread.cs index 97584f9..756869b 100644 --- a/Common/dataobjects/Thread.cs +++ b/Common/dataobjects/Thread.cs @@ -11,7 +11,7 @@ using FLocal.Common.actions; namespace FLocal.Common.dataobjects { public class Thread : SqlObject { - public const int FORMALREADMIN = 10000001; + public static readonly int FORMALREADMIN = Config.instance.MinPostId; public class TableSpec : ISqlObjectTableSpec { public const string TABLE = "Threads";