Move getting of a project to the model

This commit is contained in:
Karsten Heiken
2011-04-22 01:28:34 +02:00
parent 32478703f6
commit c4fce88509
2 changed files with 14 additions and 2 deletions

View File

@@ -65,10 +65,10 @@ class Projects extends CI_Controller {
}
public function detail($projects, $area, $id) {
$result = $this->db->get_where('projects', array('id' => $id))->row_array();
$project = $this->project->get($id);
$this->output
->set_content_type('application/json')
->set_output(json_encode(array('result' => $result)));
->set_output(json_encode($project));
}
/**