Index: branches/5.2.x/core/units/helpers/ajax_form_helper.php =================================================================== diff -u -N -r15546 -r15703 --- branches/5.2.x/core/units/helpers/ajax_form_helper.php (.../ajax_form_helper.php) (revision 15546) +++ branches/5.2.x/core/units/helpers/ajax_form_helper.php (.../ajax_form_helper.php) (revision 15703) @@ -71,12 +71,19 @@ * @param kEvent $event * @param string $call_event * @param Array $params + * @param Closure $callback + * @return bool + * @access public */ - public function transitEvent($event, $call_event, $params = Array ()) + public function transitEvent($event, $call_event, $params = Array (), $callback = null) { $params['status'] = 'OK'; $event->CallSubEvent($call_event); + if ( is_callable($callback) ) { + call_user_func($callback, $event); + } + if ( $event->status != kEvent::erSUCCESS ) { $this->prepareJSONErrors($event, $params); } @@ -92,5 +99,7 @@ } $this->sendResponse($event, $params); + + return $params['status'] == 'OK'; } } \ No newline at end of file