Index: branches/5.3.x/tools/run_event.php =================================================================== diff -u -N -r15483 -r15902 --- branches/5.3.x/tools/run_event.php (.../run_event.php) (revision 15483) +++ branches/5.3.x/tools/run_event.php (.../run_event.php) (revision 15902) @@ -1,6 +1,6 @@ Init(); $application->StoreVar('user_id', USER_ROOT, true); -$application->HandleEvent(new kEvent($argv[1])); // event name in form "prefix[.special]:event_name" +$run_event = new kEvent($argv[1]); // event name in form "prefix[.special]:event_name" +$application->HandleEvent($run_event); + $application->Done(); +$end = microtime(true); + +exit_code($run_event->status == kEvent::erSUCCESS ? 0 : 4); + +function exit_code($code, $msg = '') +{ + if ( $msg ) { + echo $msg . PHP_EOL; + } + + exit($code); +} $end = microtime(true); \ No newline at end of file