summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-12-18 14:59:44 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-12-18 14:59:44 -0800
commit2e221a84cce04f23251fa7c78a4e0a010c070b5d (patch)
tree47aceecd81ca730768247ea91be3459c1475fbbc /modules
parentc80427964751cdbd7a800996d3d556699fdf0405 (diff)
Change how request input is processed.First the input is no longer json encode, All the get variables are loaded, then the post variables if the request is a post, and then the path is extracted from the uri.
Diffstat (limited to 'modules')
-rw-r--r--modules/rest/controllers/rest.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/modules/rest/controllers/rest.php b/modules/rest/controllers/rest.php
index 0a39e02c..d1404b29 100644
--- a/modules/rest/controllers/rest.php
+++ b/modules/rest/controllers/rest.php
@@ -68,17 +68,13 @@ class Rest_Controller extends Controller {
private function _normalize_request($args=array()) {
$method = strtolower($this->input->server("REQUEST_METHOD"));
+ $request = new stdClass();
+ foreach (array_keys($this->input->get()) as $key) {
+ $request->$key = $this->input->get($key);
+ }
if ($method != "get") {
- $request = $this->input->post("request", null);
- if ($request) {
- $request = json_decode($request);
- } else {
- $request = new stdClass();
- }
- } else {
- $request = new stdClass();
- foreach (array_keys($this->input->get()) as $key) {
- $request->$key = $this->input->get($key);
+ foreach (array_keys($this->input->post()) as $key) {
+ $request->$key = $this->input->post($key);
}
}