public virtual void SetGlobalSticky(int appId, String ids) { ForumApp app = db.findById <ForumApp>(appId); if (app == null) { return; } String condition = "Id in (" + ids + ")"; List <ForumTopic> newStickTopics = db.find <ForumTopic>(condition).list(); app.StickyTopic = StickyTopic.MergeData(app.StickyTopic, newStickTopics); db.update(app); }
public virtual void MakeGlobalSticky(AdminValue av) { av.ActionId = ForumLogAction.GlobalSticky; ForumApp app = db.findById <ForumApp>(av.AppId); if (app == null) { return; } List <ForumTopic> newStickTopics = db.find <ForumTopic>(av.Condition).list(); app.StickyTopic = StickyTopic.MergeData(app.StickyTopic, newStickTopics); db.update(app); makeLog(av); }