新增标题重复验证方法
This commit is contained in:
@@ -408,7 +408,7 @@ class Article
|
|||||||
$iUserId = empty($aParam['user_id']) ? 0 : $aParam['user_id'];
|
$iUserId = empty($aParam['user_id']) ? 0 : $aParam['user_id'];
|
||||||
//查询标题是否存在
|
//查询标题是否存在
|
||||||
$aWhere = ['title' => trim($sTitle)];
|
$aWhere = ['title' => trim($sTitle)];
|
||||||
$aArticle = Db::name('article')->field('article_id,user_id,state,accept_sn')->where($aWhere)->order('article_id asc')->select();
|
$aArticle = Db::name('article')->field('article_id,user_id,state,accept_sn')->where($aWhere)->order('article_id desc')->select();
|
||||||
if(empty($aArticle)){
|
if(empty($aArticle)){
|
||||||
return ['status' => 1,'msg' => 'No articles with relevant titles found'];
|
return ['status' => 1,'msg' => 'No articles with relevant titles found'];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user