private bool setForumPolicy(ForumPolicy p) { int i_pdp = 2; postDeletionPermission e_pdp = p.getPostDeletionPermissions(); switch (e_pdp) { case postDeletionPermission.MODERATOR: i_pdp = 3; break; case postDeletionPermission.ADMIN: i_pdp = 4; break; case postDeletionPermission.SUPER_ADMIN: i_pdp = 5; break; } int i_mup = 2; modUnassignmentPermission e_mup = p.getModUnassignmentPermissions(); switch (e_mup) { case modUnassignmentPermission.ASSIGNING_ADMIN: i_mup = 3; break; case modUnassignmentPermission.SUPER_ADMIN: i_mup = 4; break; } if (!ForumSystem._db.changeForumPolicy(p.getMaxAdmins(), p.getMinAdmins(), p.getMaxModerators(), p.getMinModerators(), _name, i_pdp, p.getPasswordLifespan(), p.getModeratorsSeniority(), i_mup)) { return(false); } return(true); }
public postDeletionPermission getPostDeletionPermissions() { return((_policy == null) ? postDeletionPermission.INVALID : _policy.getPostDeletionPermissions()); }
public postDeletionPermission getPostDeletionPermissions() { return(_policy.getPostDeletionPermissions()); }