From 9c13974e3acfa6f4986c257535b6042018f59798 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 7 Aug 2011 03:15:15 -0400 Subject: [PATCH] Merge form/request data in the Controller --- data/controller.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/controller.php b/data/controller.php index 7d64c28..46706c1 100644 --- a/data/controller.php +++ b/data/controller.php @@ -44,7 +44,7 @@ class Controller extends http\RestAction /*! Gets the data from the model. */ public function DoGet(http\Request $request, http\Response $response) { - $this->model->SetFrom($request->data); + $this->model->SetFromarray_merge($request->data, $request->data['_GET']); try { $response->data = $this->model->Fetch(); } catch (ModelException $e) { @@ -59,7 +59,7 @@ class Controller extends http\RestAction /*! Updates an object in the store. */ public function DoPost(http\Request $request, http\Response $response) { - $this->model->SetFrom($request->data); + $this->model->SetFrom(array_merge($request->data, $request->data['_POST'])); try { $this->model->Update(); $response->data = $this->model->Fetch(); @@ -75,7 +75,7 @@ class Controller extends http\RestAction /*! Deletes the object from the store. */ public function DoDelete(http\Request $request, http\Response $response) { - $this->model->SetFrom($request->data); + $this->model->SetFrom(array_merge($request->data, $request->data['_POST'])); try { $this->model->Delete(); } catch (ModelException $e) { @@ -90,7 +90,7 @@ class Controller extends http\RestAction /*! Updates an object in the store. */ public function DoPut(http\Request $request, http\Response $response) { - $this->model->SetFrom($request->data); + $this->model->SetFrom(array_merge($request->data, $request->data['_POST'])); try { $this->model->Insert(); $response->data = $this->model->Fetch(); -- 2.43.5