From 22e813d0be73a95585cebcf30a1f4e03d7652d3a Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 15 Dec 2009 10:57:10 -0800 Subject: Updates the the interface based on actually using it. --- modules/rest/controllers/rest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/rest/controllers') 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); } } -- cgit v1.2.3