X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=application%2Fcontrollers%2FPathController.php;h=bb969e82c8ed6b15888a6cf9de01adc0510c7a4e;hp=aa41866679103703bb66909032302ecd59fd645d;hb=a3870411b5c5217e7b2f063d2929fc2e14daa962;hpb=ec061a75fe57a25eb7ef0894f5e723397ba35472 diff --git a/application/controllers/PathController.php b/application/controllers/PathController.php index aa41866..bb969e8 100644 --- a/application/controllers/PathController.php +++ b/application/controllers/PathController.php @@ -15,19 +15,23 @@ class PathController extends Zend_Controller_Action $path->creator = $user; $path->creatorIp = $this->getRequest()->getClientIp(true); - return $this->save($path, $formData); + $this->save($path, $formData); + $data = array('redirect' => "idx/" . (string)$path->id); + $this->_helper->SyjApi->setCode(201)->setBodyJson($data); } public function updateAction() { $formData = $this->_helper->SyjPostData->getPostData('Syj_Form_Geom'); - return $this->save($this->getPath(), $formData); + $path = $this->getPath(); + $this->save($path, $formData); + $this->_helper->SyjApi->setCode(200); // we should use 204, but ie mangles 204 to 1223 } public function deleteAction() { $path = $this->getPath(); $pathMapper = new Syj_Model_PathMapper(); $pathMapper->delete ($path); - $this->_helper->SyjApi->setCode(204); + $this->_helper->SyjApi->setCode(200); // we should use 204, but ie mangles 204 to 1223 } public function getPath() { @@ -84,8 +88,6 @@ class PathController extends Zend_Controller_Action throw $e; } } - - $this->_helper->SyjApi->setBody($path->id); } }