mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-09 15:00:07 +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
@ -2685,6 +2685,9 @@ class calendar_boupdate extends calendar_bo
|
|||||||
*/
|
*/
|
||||||
function purge($age)
|
function purge($age)
|
||||||
{
|
{
|
||||||
$this->so->purge(time() - 365*24*3600*(float)$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)
|
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_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_');
|
$jobs[$row['async_id']] = egw_db::strip_array_keys($row,'async_');
|
||||||
}
|
}
|
||||||
if (!count($jobs))
|
if (!count($jobs))
|
||||||
|
Loading…
Reference in New Issue
Block a user