/** * look if keyword group with given name or/and id exists * @return json * @author Evgine Aperyan */ function keyword_group_exists() { $this->load->model('ranking_model'); $group_id = $this->input->post('group_id') ? $this->input->post('group_id') : -2; $exsits = $this->ranking_model->keywordGroupExists($this->input->post('group_name'), $group_id, $this->ion_auth->get_user_id()); $this->output->set_content_type('application/json')->set_output(json_encode(array('exsits' => $exsits))); }