Index: core/units/helpers/ajax_form_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/ajax_form_helper.php (revision 15682) +++ core/units/helpers/ajax_form_helper.php (revision ) @@ -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