Skip to content
Permalink
Browse files Browse the repository at this point in the history
Update CatalogController.class.php
  • Loading branch information
star7th committed Nov 28, 2018
1 parent 1bbd9ec commit bcdb5e3
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -112,7 +112,12 @@ public function save(){
}

if ($cat_id > 0 ) {

$cat = D("Catalog")->where(" cat_id = '$cat_id' ")->find();
$item_id = $cat['item_id'];
if (!$this->checkItemPermn($login_user['uid'] , $item_id)) {
$this->sendError(10103);
return;
}
//如果一个目录已经是别的目录的父目录,那么它将无法再转为level4目录
if (D("Catalog")->where(" parent_cat_id = '$cat_id' ")->find() && $data['level'] == 4 ) {
$this->sendError(10101,"该目录含有子目录,不允许转为底层目录。");
Expand Down

0 comments on commit bcdb5e3

Please sign in to comment.