public function postUpdate($post) { if (isset($post['plugin']) && isset($post['plugin'][$this->id])) { $category_model = new blogCategoryPostModel(); $category_model->changePost($post['id'], array_keys($post['plugin'][$this->id])); } }
public function postUpdate($post) { $post_id = $post['id']; if (isset($post['plugin']) && isset($post['plugin'][$this->id])) { if ($post['plugin'][$this->id]) { $categories = array_filter(array_keys($post['plugin'][$this->id])); } else { $categories = array(); } $category_model = new blogCategoryPostModel(); $category_model->changePost($post['id'], $categories); } }