diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-15 10:57:10 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-15 10:57:10 -0800 |
commit | 22e813d0be73a95585cebcf30a1f4e03d7652d3a (patch) | |
tree | 5bc4ece31871e6a885643b93e51aef7764eabeb9 /modules/rest/controllers | |
parent | 3f8d17fcf13ab8c2f213338bca951120bce5b9c7 (diff) |
Updates the the interface based on actually using it.
Diffstat (limited to 'modules/rest/controllers')
-rw-r--r-- | modules/rest/controllers/rest.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/rest/controllers/rest.php b/modules/rest/controllers/rest.php index 577d8aeb..0a39e02c 100644 --- a/modules/rest/controllers/rest.php +++ b/modules/rest/controllers/rest.php @@ -18,7 +18,7 @@ */ class Rest_Controller extends Controller { public function access_key() { - $request = json_decode($this->input->post("request")); + $request = (object)$this->input->get(); if (empty($request->user) || empty($request->password)) { print rest::forbidden("No user or password supplied"); return; @@ -66,7 +66,7 @@ class Rest_Controller extends Controller { } } - private function _normalize_request($args) { + private function _normalize_request($args=array()) { $method = strtolower($this->input->server("REQUEST_METHOD")); if ($method != "get") { $request = $this->input->post("request", null); @@ -77,7 +77,7 @@ class Rest_Controller extends Controller { } } else { $request = new stdClass(); - foreach (array_keys($_GET) as $key) { + foreach (array_keys($this->input->get()) as $key) { $request->$key = $this->input->get($key); } } |