Index: branches/5.2.x/core/units/helpers/ajax_form_helper.php =================================================================== diff -u -N -r15145 -r15357 --- branches/5.2.x/core/units/helpers/ajax_form_helper.php (.../ajax_form_helper.php) (revision 15145) +++ branches/5.2.x/core/units/helpers/ajax_form_helper.php (.../ajax_form_helper.php) (revision 15357) @@ -51,8 +51,12 @@ * @param kEvent $event * @param Array $response */ - public function sendResponse($event, $response) + public function sendResponse($event, $response = Array ()) { + if ( !isset($response['status']) ) { + $response['status'] = 'OK'; + } + $json_helper = $this->Application->recallObject('JSONHelper'); /* @var $json_helper JSONHelper */ @@ -77,6 +81,10 @@ $this->prepareJSONErrors($event, $params); } else { + if ( !isset($params['redirect_to']) && ($event->redirect === true || strlen($event->redirect) > 0) ) { + $params['redirect_to'] = $this->Application->HREF($event->redirect, '', $event->getRedirectParams(), $event->redirectScript); + } + $params = array_merge($params, $event->getRedirectParams()); }