function delete($id) { global $cache; check_allowed_category($id, LZ_RESPONSE == 'text'); $cat = $this->get_one($id); if ($cat['status'] == 2) { include_once LZ_BASEPATH . 'model/item.php'; $item = new LZ_Item(); $this_item = $item->get_one(array('status' => 3, 'category_id' => $id)); if ($this_item) { $item->delete($this_item['item_id']); } } $re = parent::delete($id); $cache->clear_uri('#admin/category'); return $re; }
function delete($id) { $this_item = $this->get_one($id); check_allowed_category($this_item['category_id'], LZ_RESPONSE == 'text'); return parent::delete($id); }
function delete($id) { $this_paper = $this->get_one($id); return parent::delete($id); }