/** * ResumeSchedule * If a scheduled job is a "splittest" type, then this will resume the schedule * and set an appropriate message in the "GLOBALS[Message]" field. * * If it's not a splittest job, then this will just return. * * @param EventData_IEM_SCHEDULE_RESUMEJOB $data The data array contains the jobtype and the jobid to process. * * @uses InterspireEventData::preventDefault() * @uses Splittest_Send_API::ResumeJob() */ public static function ResumeSchedule(EventData_IEM_SCHEDULE_RESUMEJOB $data) { $jobinfo =& $data->jobrecord; if ($jobinfo['jobtype'] != 'splittest') { return; } $data->preventDefault(); require_once dirname(__FILE__) . '/api/splittest_send.php'; $send_api = new Splittest_Send_API(); $resumed = $send_api->ResumeJob($jobinfo['jobid']); if ($resumed) { FlashMessage(GetLang('Addon_splittest_Send_Resumed_Success'), SS_FLASH_MSG_SUCCESS); } else { FlashMessage(GetLang('Addon_splittest_Send_Resumed_Failure'), SS_FLASH_MSG_ERROR); } $GLOBALS['Message'] = GetFlashMessages(); }