parent
25abc16e15
commit
f467d085b0
|
@ -1117,11 +1117,10 @@ class Form extends Zend_Form
|
||||||
// API targets and API requests will never redirect but immediately respond w/ JSON-encoded
|
// API targets and API requests will never redirect but immediately respond w/ JSON-encoded
|
||||||
// notifications
|
// notifications
|
||||||
$messages = Notification::getInstance()->popMessages();
|
$messages = Notification::getInstance()->popMessages();
|
||||||
// @TODO(el): Use ApiResponse class for unified response handling.
|
// @TODO(el): Remove the type from the message
|
||||||
$this->getResponse()->sendJson(array(
|
$this->getResponse()->json()
|
||||||
'status' => 'success',
|
->setSuccessData(array('message' => array_pop($messages)))
|
||||||
'message' => array_pop($messages) // @TODO(el): Remove the type from the message
|
->sendResponse();
|
||||||
));
|
|
||||||
} elseif (! $frameUpload) {
|
} elseif (! $frameUpload) {
|
||||||
$this->getResponse()->redirectAndExit($this->getRedirectUrl());
|
$this->getResponse()->redirectAndExit($this->getRedirectUrl());
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue