From 3395b43b5d7980a8ac7888455536586d8466c255 Mon Sep 17 00:00:00 2001 From: Karsten Heiken Date: Fri, 22 Jul 2011 16:06:48 +0200 Subject: [PATCH] Move API into new folder for better managability. --- application/controllers/statusrpc.php | 49 --------------------------- 1 file changed, 49 deletions(-) delete mode 100644 application/controllers/statusrpc.php diff --git a/application/controllers/statusrpc.php b/application/controllers/statusrpc.php deleted file mode 100644 index 89fec9b..0000000 --- a/application/controllers/statusrpc.php +++ /dev/null @@ -1,49 +0,0 @@ -load->model('job'); - - $query = $this->db->get_where('servers', array('secret' => $secret)); - - // if we are in production mode, we do not want to tell the evil hacker - // that he used a wrong secret. That just encourages him. - if($query->num_rows() < 1 && ENVIRONMENT != 'production') { - die("Unauthorized access."); - } - - $this->job->update($job_id, $progress); - } - - /** - * Update the workload of the server. - */ - public function update_workload($secret, $workload) { - $this->load->model('server'); - $query = $this->db->get_where('servers', array('secret' => $secret)); - - // if we are in production mode, we do not want to tell the evil hacker - // that he used a wrong secret. That just encourages him. - if($query->num_rows() < 1 && ENVIRONMENT != 'production') { - die("Unauthorized access."); - } - - $this->server->updateWorkload($secret, $workload); - } -} \ No newline at end of file