mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
reverting back to arbitrary job data AND adding other job parameters only if data is an array, it made to many problems requiring it to be an array
This commit is contained in:
parent
7dea8e14c4
commit
12705d58a6
@ -65,13 +65,13 @@ class asyncservice
|
||||
* eg. '<app><id>X' where id is the internal id of app and X might indicate the action.
|
||||
* @param string $method Method to be called via ExecMethod($method,$data). $method has the form
|
||||
* '<app>.<class>.<public function>'.
|
||||
* @param array $data=null This data is passed back when the method is called. EGroupware adds the
|
||||
* rest of the job parameters like id, next (sheduled exec time), times, ...
|
||||
* @param mixed $data=null This data is passed back when the method is called. If it is an array,
|
||||
* EGroupware will add the rest of the job parameters like id, next (sheduled exec time), times, ...
|
||||
* @param int $account_id account_id, under which the methode should be called or False for the actual user
|
||||
* @param boolean $debug=false
|
||||
* @return boolean False if $id already exists, else True
|
||||
*/
|
||||
function set_timer($times,$id,$method,array $data=null,$account_id=False,$debug=false)
|
||||
function set_timer($times,$id,$method,$data=null,$account_id=False,$debug=false)
|
||||
{
|
||||
if (empty($id) || empty($method) || $this->read($id) ||
|
||||
!($next = $this->next_run($times,$debug)))
|
||||
@ -426,7 +426,11 @@ class asyncservice
|
||||
list($app) = strpos($job['method'],'::') !== false ? explode('_',$job['method']) :
|
||||
explode('.',$job['method']);
|
||||
translation::add_app($app);
|
||||
ExecMethod($job['method'],(array)$job['data']+array_diff_key($job,array('data' => false)));
|
||||
if (is_array($job['data']))
|
||||
{
|
||||
$job['data'] += array_diff_key($job,array('data' => false));
|
||||
}
|
||||
ExecMethod($job['method'],$job['data']);
|
||||
|
||||
// re-read job, in case it had been updated or even deleted in the method
|
||||
$updated = $this->read($id);
|
||||
|
Loading…
Reference in New Issue
Block a user