Floobage boards implemented

main
Inga 🏳‍🌈 14 years ago
parent 42b179408e
commit ae59598fc3
  1. 2
      Builder/IISMainHandler/build.txt
  2. 10
      Common/dataobjects/Board.cs
  3. 2
      Common/dataobjects/Moderator.cs

@ -32,6 +32,7 @@ namespace FLocal.Common.dataobjects {
public const string FIELD_LEGACYNAME = "LegacyName";
public const string FIELD_ISTRANSFERTARGET = "IsTransferTarget";
public const string FIELD_ISTOPICSTARTERMODERATION = "IsTopicstarterModeration";
public const string FIELD_ISFLOOBAGE = "IsFloobage";
public static readonly TableSpec instance = new TableSpec();
public string name { get { return TABLE; } }
public string idName { get { return FIELD_ID; } }
@ -159,6 +160,14 @@ namespace FLocal.Common.dataobjects {
}
}
private bool _isFloobage;
public bool isFloobage {
get {
this.LoadIfNotLoaded();
return this._isFloobage;
}
}
protected override void doFromHash(Dictionary<string, string> data) {
this._sortOrder = int.Parse(data[TableSpec.FIELD_SORTORDER]);
this._categoryId = Util.ParseInt(data[TableSpec.FIELD_CATEGORYID]);
@ -171,6 +180,7 @@ namespace FLocal.Common.dataobjects {
this._legacyName = data[TableSpec.FIELD_LEGACYNAME].ToLower();
this._isTransferTarget = Util.string2bool(data[TableSpec.FIELD_ISTRANSFERTARGET]);
this._isTopicstarterModeration = Util.string2bool(data[TableSpec.FIELD_ISTOPICSTARTERMODERATION]);
this._isFloobage = Util.string2bool(data[TableSpec.FIELD_ISFLOOBAGE]);
}
private readonly object subBoards_Locker = new object();

@ -113,7 +113,7 @@ namespace FLocal.Common.dataobjects {
return isModerator_cache[account.id][board.id];
}
public static bool isModerator(Account account, Thread thread) {
return (thread.board.isTopicstarterModeration && thread.topicstarterId == account.userId) || isTrueModerator(account, thread.board);
return (thread.board.isFloobage) || (thread.board.isTopicstarterModeration && thread.topicstarterId == account.userId) || isTrueModerator(account, thread.board);
}
public static bool isModerator(User user, Thread thread) {
Account account;

Loading…
Cancel
Save