public function delete() { $this->output->set_content_type('application/json'); $url = $this->uri->ruri_to_assoc(3); $task_set_type_id = isset($url['task_set_type_id']) ? intval($url['task_set_type_id']) : 0; if ($task_set_type_id !== 0) { $this->_transaction_isolation(); $this->db->trans_begin(); $task_set_type = new Task_set_type(); $task_set_type->get_by_id($task_set_type_id); $task_set_type->delete(); if ($this->db->trans_status()) { $this->db->trans_commit(); $this->output->set_output(json_encode(TRUE)); $this->_action_success(); } else { $this->db->trans_rollback(); $this->output->set_output(json_encode(FALSE)); } } else { $this->output->set_output(json_encode(FALSE)); } }