In scheduled list, show last / next run times in user time. Async still runs in server time though, so added a message about that to edit dialog.

This commit is contained in:
Nathan Gray 2012-02-01 20:49:27 +00:00
parent 8018a0f243
commit 03756ddaf2
3 changed files with 9 additions and 31 deletions

View File

@ -59,34 +59,6 @@
$async['data'][$messages] = $list; $async['data'][$messages] = $list;
} }
} }
/*
if(is_array($async['data']['errors'])) {
$processed_errors = array();
foreach($async['data']['errors'] as $target => $errors)
{
$processed_errors[] = array(
'target' => (is_numeric($target) ? '' : $target),
'error' => implode("\n", (array)$errors)
);
}
$async['data']['errors'] = $processed_errors;
}
$results = array();
foreach((array)$async['data']['warnings'] as $target => $message)
{
$warnings[] = array(
'target' => $target,
'result' => implode("\n",(array)$result)
);
}
foreach((array)$async['data']['result'] as $target => $result)
{
$results[] = array(
'target' => $target,
'result' => implode("\n",(array)$result)
);
}
*/
if($results) if($results)
{ {
$async['data']['result'] = $results; $async['data']['result'] = $results;
@ -96,8 +68,9 @@
} }
$data['scheduled'][] = array_merge($async['data'], array( $data['scheduled'][] = array_merge($async['data'], array(
'id' => $id, 'id' => $id,
'next' => $async['next'], 'next' => egw_time::server2user($async['next']),
'times' => str_replace("\n", '', print_r($async['times'], true)), 'times' => str_replace("\n", '', print_r($async['times'], true)),
'last_run' => $async['data']['last_run'] ? egw_time::server2user($async['data']['last_run']) : ''
)); ));
} }
array_unshift($data['scheduled'], false); array_unshift($data['scheduled'], false);
@ -179,6 +152,10 @@
} }
$data['no_delete_files'] = $data['type'] != 'import'; $data['no_delete_files'] = $data['type'] != 'import';
// Current server time for nice message
$data['current_time'] = time();
$sel_options = self::get_select_options($data); $sel_options = self::get_select_options($data);
$GLOBALS['egw']->js->validate_file('.','importexport','importexport'); $GLOBALS['egw']->js->validate_file('.','importexport','importexport');

View File

@ -79,6 +79,7 @@ save as definition importexport en Save as definition
schedule common en Schedule schedule common en Schedule
schedule import / export common en Schedule import | export schedule import / export common en Schedule import | export
schedule not found importexport en Schedule not found. schedule not found importexport en Schedule not found.
schedule times are server time! Currently %s. importexport en Schedule times are server time! Currently %s.
select definition importexport en Select definition select definition importexport en Select definition
select plugin importexport en Select plugin select plugin importexport en Select plugin
select... importexport en Select... select... importexport en Select...

File diff suppressed because one or more lines are too long