CC-4895: Remove all json die() statements from code

- removed json_encode
This commit is contained in:
denise 2013-02-07 15:41:47 -05:00
parent 7bc4151741
commit 525b2dcb33
15 changed files with 43 additions and 51 deletions

View file

@ -53,7 +53,7 @@ class UserController extends Zend_Controller_Action
&& $formData['user_id'] != 0) {
$this->view->form = $form;
$this->view->successMessage = "<div class='errors'>"._("Specific action is not allowed in demo version!")."</div>";
$this->_helper->json->sendJson(json_encode(array("valid"=>"false", "html"=>$this->view->render('user/add-user.phtml'))));
$this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('user/add-user.phtml')));
} elseif ($form->validateLogin($formData)) {
$user = new Application_Model_User($formData['user_id']);
if (empty($formData['user_id'])) {
@ -89,14 +89,14 @@ class UserController extends Zend_Controller_Action
$this->view->successMessage = "<div class='success'>"._("User updated successfully!")."</div>";
}
$this->_helper->json->sendJson(json_encode(array("valid"=>"true", "html"=>$this->view->render('user/add-user.phtml'))));
$this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('user/add-user.phtml')));
} else {
$this->view->form = $form;
$this->_helper->json->sendJson(json_encode(array("valid"=>"false", "html"=>$this->view->render('user/add-user.phtml'))));
$this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('user/add-user.phtml')));
}
} else {
$this->view->form = $form;
$this->_helper->json->sendJson(json_encode(array("valid"=>"false", "html"=>$this->view->render('user/add-user.phtml'))));
$this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('user/add-user.phtml')));
}
}
@ -135,7 +135,7 @@ class UserController extends Zend_Controller_Action
&& $formData['cu_login'] == 'admin') {
$this->view->form = $form;
$this->view->successMessage = "<div class='errors'>"._("Specific action is not allowed in demo version!")."</div>";
$this->_helper->json->sendJson(json_encode(array("html"=>$this->view->render('user/edit-user.phtml'))));
$this->_helper->json->sendJson(array("html"=>$this->view->render('user/edit-user.phtml')));
} else if ($form->isValid($formData) &&
$form->validateLogin($formData['cu_login'], $formData['cu_user_id'])) {
$user = new Application_Model_User($formData['cu_user_id']);