Backup/Discuz.Web.Services/API/Actions/Topics.cs
(开头部分) 60KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using Discuz.Common;
using Newtonsoft.Json;
using Discuz.Entity;
using Discuz.Forum;
using Discuz.Config;
using Discuz.Common.Generic;
namespace Discuz.Web.Services.API.Actions
{
public class Topics : ActionBase
{
/// <summary>
/// 创建主题
/// </summary>
/// <returns></returns>
public string Create()
{
if (Signature != GetParam("sig").ToString())
{
ErrorCode = (int)ErrorType.API_EC_SIGNATURE;
return "";
}
//如果是桌面程序则需要验证用户身份
if (this.App.ApplicationType == (int)ApplicationType.DESKTOP)
{
if (Uid < 1)
{
ErrorCode = (int)ErrorType.API_EC_SESSIONKEY;
return "";
}
}
if (CallId <= LastCallId)
{
ErrorCode = (int)ErrorType.API_EC_CALLID;
return "";
}
if (!CheckRequiredParams("topic_info"))
{
ErrorCode = (int)ErrorType.API_EC_PARAM;
return "";
}
Topic topic;
try
{
topic = JavaScriptConvert.DeserializeObject<Topic>(GetParam("topic_info").ToString());
}
catch
{
ErrorCode = (int)ErrorType.API_EC_PARAM;
return "";
}
if (topic == null || AreParamsNullOrZeroOrEmptyString(topic.UId, topic.Fid, topic.Title, topic.Message))//(topic == null || topic.UId == 0 || topic.Fid == 0 || topic.Title == null || topic.Message == null)
{
后面还有 1573 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
