Commit 7902ecc9 authored by hujun's avatar hujun

edit

parent 586b0c0d
...@@ -145,10 +145,13 @@ class News extends Basic ...@@ -145,10 +145,13 @@ class News extends Basic
return $this->response(101, '文章内容为空'); return $this->response(101, '文章内容为空');
} }
if (mb_strlen($this->params['content']) > 501) {
return $this->response(101, '内容字数超过限制!');
}
$data['agent_id'] = $this->agentId; $data['agent_id'] = $this->agentId;
$data['s_news_id'] = $this->params['news_id']; $data['s_news_id'] = $this->params['news_id'];
$data['comment_content'] = $this->params['content']; $data['comment_content'] = htmlentities($this->params['content']);
$data['status'] = 0; $data['status'] = 0;
$m_new_comment = new SNewsComment(); $m_new_comment = new SNewsComment();
......
...@@ -84,10 +84,6 @@ class News extends Basic ...@@ -84,10 +84,6 @@ class News extends Basic
return $this->response(101, '内容为空!'); return $this->response(101, '内容为空!');
} }
if (mb_strlen($this->params['content']) > 501) {
return $this->response(101, '内容字数超过限制!');
}
if (empty($this->params['file_img'])) { if (empty($this->params['file_img'])) {
return $this->response(101, '封面图片为空'); return $this->response(101, '封面图片为空');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment