MinPostId config setting implemented

main
Inga 🏳‍🌈 14 years ago
parent f44797c027
commit da963bc3e7
  1. 3
      Common/Config.cs
  2. 2
      Common/dataobjects/Thread.cs

@ -37,6 +37,8 @@ namespace FLocal.Common {
public readonly HashSet<string> 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<string>(from host in data["AdditionalHosts"].Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries) select host.Trim());
this.MinPostId = int.Parse(data["MinPostId"]);
}
public static void Init(NameValueCollection data) {

@ -11,7 +11,7 @@ using FLocal.Common.actions;
namespace FLocal.Common.dataobjects {
public class Thread : SqlObject<Thread> {
public const int FORMALREADMIN = 10000001;
public static readonly int FORMALREADMIN = Config.instance.MinPostId;
public class TableSpec : ISqlObjectTableSpec {
public const string TABLE = "Threads";

Loading…
Cancel
Save