/** * Used to return the results from the search as an ajax request. * @todo add check to make sure that the paper is 'approved' */ public function query() { $papers = Search_Papers::search($this->input->get()); echo json_encode($papers); die; }
/** * Search Results */ public function query() { // make sure that deleted papers no longer show. $query = $this->input->get(); $query['status'] = array('approved', 'pending'); $papers = Search_Papers::search($query); echo json_encode($papers); die; }