/// <summary> /// 获取主题信息 /// </summary> /// <returns></returns> public TopicInfo GetTopicInfo() { string go = DNTRequest.GetString("go").Trim().ToLower(); if (go == "") { forumid = 0; } else if (forumid == 0) { go = ""; } TopicInfo topicInfo; // 获取该主题的信息 switch (go) { case "prev": topicInfo = Topics.GetTopicInfo(topicid, forumid, 1); break; case "next": topicInfo = Topics.GetTopicInfo(topicid, forumid, 2); break; default: topicInfo = Topics.GetTopicInfo(topicid); break; } if (topicInfo == null) { if (go == "prev") { msg = "没有更旧的主题, 请返回"; } else if (go == "next") { msg = "没有更新的主题, 请返回"; } else { msg = "该主题不存在"; } //如果站点开启了QQ Connect if (DiscuzCloud.GetCloudServiceEnableStatus("connect")) { DeleteFeed df = new DeleteFeed(); df.DeleteTopicPushedFeed(topicid); } AddErrLine(msg); GetForumAds(0); } return(topicInfo); }
/// <summary> /// 获取主题信息 /// </summary> /// <returns></returns> public TopicInfo GetTopicInfo() { string go = DNTRequest.GetString("go").Trim().ToLower(); if (go == "") forumid = 0; else if (forumid == 0) go = ""; TopicInfo topicInfo; // 获取该主题的信息 switch (go) { case "prev": topicInfo = Topics.GetTopicInfo(topicid, forumid, 1); break; case "next": topicInfo = Topics.GetTopicInfo(topicid, forumid, 2); break; default: topicInfo = Topics.GetTopicInfo(topicid); break; } if (topicInfo == null) { if (go == "prev") msg = "没有更旧的主题, 请返回"; else if (go == "next") msg = "没有更新的主题, 请返回"; else msg = "该主题不存在"; //如果站点开启了QQ Connect if (DiscuzCloud.GetCloudServiceEnableStatus("connect")) { DeleteFeed df = new DeleteFeed(); df.DeleteTopicPushedFeed(topicid); } AddErrLine(msg); GetForumAds(0); } return topicInfo; }