mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 04:19:41 +01:00
* Calendar/API: allow not serialized data in async jobs, only run automatic purge if we have a real number > 0
This commit is contained in:
parent
ff9443acff
commit
4c15c2f2de
@ -2684,7 +2684,10 @@ class calendar_boupdate extends calendar_bo
|
||||
* @param int|float $age How many years old the event must be before it is deleted
|
||||
*/
|
||||
function purge($age)
|
||||
{
|
||||
if (is_numeric($age) && $age > 0) // just make sure bogus values dont delete everything
|
||||
{
|
||||
$this->so->purge(time() - 365*24*3600*(float)$age);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -502,7 +502,7 @@ class asyncservice
|
||||
foreach($this->db->select($this->db_table,$cols,$where,__LINE__,__FILE__,$offset,$append,False,$num_rows) as $row)
|
||||
{
|
||||
$row['async_times'] = json_php_unserialize($row['async_times']);
|
||||
$row['async_data'] = json_php_unserialize($row['async_data']);
|
||||
$row['async_data'] = json_php_unserialize($row['async_data'], true); // allow non-serialized data
|
||||
$jobs[$row['async_id']] = egw_db::strip_array_keys($row,'async_');
|
||||
}
|
||||
if (!count($jobs))
|
||||
|
Loading…
Reference in New Issue
Block a user