Example #1
0
        /// <summary>
        /// 修复主题列表
        /// </summary>
        /// <param name="topicList">主题id列表</param>
        /// <returns>更新记录数</returns>
        public static int RepairTopicList(string topicList)
        {
            if (!Utils.IsNumericList(topicList))
            {
                return(0);
            }

            int revalcount = 0;

            string[] idlist  = Posts.GetPostTableIdArray(topicList);
            string[] tidlist = topicList.Split(',');
            for (int i = 0; i < idlist.Length; i++)
            {
                int reval = Discuz.Data.TopicAdmins.RepairTopics(tidlist[i], BaseConfigs.GetTablePrefix + "posts" + (TypeConverter.StrToInt(idlist[i])));
                if (reval > 0)
                {
                    revalcount = reval + revalcount;
                    Attachments.UpdateTopicAttachment(topicList);
                }
            }
            return(revalcount);
        }
Example #2
0
 /// <summary>
 /// 批量删除主题
 /// </summary>
 /// <param name="tidList">主题Id列表</param>
 /// <param name="isChagePostNumAndCredits">是否要更新用户的主题数与积分</param>
 /// <param name="adminUid">管理员Uid</param>
 /// <param name="adminUserName">管理员用户名</param>
 /// <param name="adminUserGroupId">管理员用户组Id</param>
 /// <param name="adminUserGroupTitle">管理员用户组名称</param>
 /// <param name="adminIp">管理员Ip</param>
 public static void BatchDeleteTopics(string tidList, bool isChagePostNumAndCredits, int adminUid, string adminUserName, int adminUserGroupId, string adminUserGroupTitle, string adminIp)
 {
     DeleteTopics(tidList, isChagePostNumAndCredits ? 1 : 0, false);
     Attachments.UpdateTopicAttachment(tidList);
     AdminVistLogs.InsertLog(adminUid, adminUserName, adminUserGroupId, adminUserGroupTitle, adminIp, "批量删除主题", "主题ID:" + tidList);
 }