修复删除公告的bug
This commit is contained in:
parent
9888ab73ef
commit
92ac2609eb
@ -199,9 +199,9 @@ class Index extends BaseController
|
|||||||
if ($cate_count > 0) {
|
if ($cate_count > 0) {
|
||||||
return to_assign(1, "该分类下还有子分类,无法删除");
|
return to_assign(1, "该分类下还有子分类,无法删除");
|
||||||
}
|
}
|
||||||
$content_count = Db::name('Note')->where(["cate_id" => $id])->count();
|
$content_count = Db::name('Note')->where(["cate_id" => $id,'status'=>1])->count();
|
||||||
if ($content_count > 0) {
|
if ($content_count > 0) {
|
||||||
return to_assign(1, "该分类下还有文章,无法删除");
|
return to_assign(1, "该分类下还有公告,无法删除");
|
||||||
}
|
}
|
||||||
if (Db::name('NoteCate')->delete($id) !== false) {
|
if (Db::name('NoteCate')->delete($id) !== false) {
|
||||||
add_log('delete', $id);
|
add_log('delete', $id);
|
||||||
|
@ -15,7 +15,7 @@ if (empty(file_exists(__DIR__ . '/../vendor/autoload.php'))) {
|
|||||||
require __DIR__ . '/../vendor/autoload.php';
|
require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
// 定义当前版本号
|
// 定义当前版本号
|
||||||
define('CMS_VERSION','4.60.28');
|
define('CMS_VERSION','4.80.09');
|
||||||
|
|
||||||
// 定义Layui版本号
|
// 定义Layui版本号
|
||||||
define('LAYUI_VERSION','2.8.12');
|
define('LAYUI_VERSION','2.8.12');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user