Beispiel #1
0
        public static int RepairTopicList(string topicList)
        {
            if (!Utils.IsNumericList(topicList))
            {
                return(0);
            }

            int num = 0;

            //string[] postTableIdArray = Posts.GetPostTableIdArray(topicList);
            string[] array = topicList.Split(',');
            for (int i = 0; i < array.Length; i++)
            {
                //int num2 = TopicAdmins.RepairTopics(array[i], BaseConfigs.GetTablePrefix + "posts" + postTableIdArray[i].ToInt());
                var tp   = Topic.FindByID(array[i].ToInt());
                int num2 = tp.Repair();
                if (num2 > 0)
                {
                    num = num2 + num;
                    Attachments.UpdateTopicAttachment(topicList);
                }
            }
            return(num);
        }
Beispiel #2
0
 public static void BatchDeleteTopics(string tidList, bool isChagePostNumAndCredits, int adminUid, string adminUserName, int adminUserGroupId, string adminUserGroupTitle, string adminIp)
 {
     TopicAdmins.DeleteTopics(tidList, isChagePostNumAndCredits ? 1 : 0, false);
     Attachments.UpdateTopicAttachment(tidList);
     AdminVisitLog.InsertLog(adminUid, adminUserName, adminUserGroupId, adminUserGroupTitle, adminIp, "批量删除主题", "主题ID:" + tidList);
 }