star7th 7 سال پیش
والد
کامیت
817233a859

+ 1 - 1
server/Application/Api/Controller/CatalogController.class.php

@@ -153,7 +153,7 @@ class CatalogController extends BaseController {
             return;
         }
 
-        if (D("Page")->where(" cat_id = '$cat_id' ")->find() || D("Catalog")->where(" parent_cat_id = '$cat_id' ")->find()) {
+        if (D("Page")->where(" cat_id = '$cat_id' and is_del = 0")->find() || D("Catalog")->where(" parent_cat_id = '$cat_id' ")->find()) {
             $return['error_code'] = -1 ;
             $return['error_message'] = L('no_delete_empty_catalog') ;
             $this->sendResult($return);

+ 1 - 1
server/Application/Api/Model/PageModel.class.php

@@ -57,7 +57,7 @@ class PageModel extends BaseModel {
         }
 
         if ($page_content) {
-            $page_array = D("Page")->where(" item_id = '$item_id'  and cat_id = '$cat_id'  and page_title ='%s' ",array($page_title))->find();
+            $page_array = D("Page")->where(" item_id = '$item_id' and is_del = 0  and cat_id = '$cat_id'  and page_title ='%s' ",array($page_title))->find();
             //如果不存在则新建
             if (!$page_array) {
                 $add_data = array(