mirror of https://github.com/1099438829/apeblog
This commit is contained in:
parent
01785b105e
commit
84ad4aadbf
|
|
@ -118,11 +118,7 @@ class Article extends Base
|
||||||
}
|
}
|
||||||
//获取该文章
|
//获取该文章
|
||||||
$documentModel = new Document();
|
$documentModel = new Document();
|
||||||
if (is_int($id)){
|
$article = $documentModel->where('status', 1)->where('id|alias', $id)->find();
|
||||||
$article = $documentModel->where('status', 1)->where('id', $id)->find();
|
|
||||||
}else{
|
|
||||||
$article = $documentModel->where('status', 1)->where('alias', $id)->find();
|
|
||||||
}
|
|
||||||
if (!$article) {
|
if (!$article) {
|
||||||
$this->error('文章不存在或已删除!');
|
$this->error('文章不存在或已删除!');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue