Browse Source

Update CatalogController.class.php

star7th 8 years ago
parent
commit
d0093201c2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Application/Home/Controller/CatalogController.class.php

+ 2 - 2
Application/Home/Controller/CatalogController.class.php

@@ -132,7 +132,7 @@ class CatalogController extends BaseController {
             return;
         }
 
-        if (D("Page")->where(" cat_id = '$cat_id' ")->find()) {
+        if (D("Page")->where(" cat_id = '$cat_id' ")->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);
@@ -156,4 +156,4 @@ class CatalogController extends BaseController {
 
 
 
-}
+}