Explorar o código

Update CatalogController.class.php

star7th %!s(int64=8) %!d(string=hai) anos
pai
achega
d0093201c2
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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 {
 
 
 
-}
+}