mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
re-read job, in case it had been updated or even deleted in the method
This commit is contained in:
parent
008c95aa98
commit
04650e3680
@ -435,14 +435,21 @@
|
||||
$GLOBALS['phpgw']->translation->add_app($app);
|
||||
|
||||
ExecMethod($job['method'],$job['data']);
|
||||
|
||||
if ($job['next'] = $this->next_run($job['times']))
|
||||
|
||||
// re-read job, in case it had been updated or even deleted in the method
|
||||
$updated = $this->read($id);
|
||||
if ($updated && isset($updated[$id]))
|
||||
{
|
||||
$this->write($job,True);
|
||||
}
|
||||
else // no further runs
|
||||
{
|
||||
$this->delete($job['id']);
|
||||
$job = $updated[$id];
|
||||
|
||||
if ($job['next'] = $this->next_run($job['times']))
|
||||
{
|
||||
$this->write($job,True);
|
||||
}
|
||||
else // no further runs
|
||||
{
|
||||
$this->delete($job['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user