AAAAhome/academiac/www/administrator/components/com_chronoforms/form_actions/event_loop/event_loop.php000060400000002722151466426420030202 0ustar00 'Event Loop', 'tooltip' => 'Load another event, useful in redisplaying the form after some error occurs.'); function run($form, $actiondata){ $events = unserialize(base64_decode($form->form_details->events_actions_map)); $params = new JParameter($actiondata->params); $targetEvent = $params->get('target_event', '_form_actions_events_map[myform][events][load]'); if(empty($targetEvent)){ $targetEvent = '_form_actions_events_map[myform][events][load]'; } $targetEvent = str_replace(array('_form_actions_events_map[', ']'), '', $targetEvent); $path = explode('[', $targetEvent); unset($path[0]); foreach($path as $k => $v){ if($k == count($path)){ break; } $events = $events[$v]; } $form->_processEvents($path[count($path)], $events); if($params->get('quit_next', 1)){ //halt any future scheduled actions processing (exit the main actions loop) $form->stop = true; } } function load($clear){ if($clear){ $action_params = array( 'target_event' => '', 'quit_next' => 1 ); } return array('action_params' => $action_params); } } ?>