mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 05:29:13 +01:00
* CalDAV/InfoLog: fix infinit loop causing high database load, if sync-collection report did not query calendar-data
This commit is contained in:
parent
d72ee9c962
commit
053503bd74
@ -300,8 +300,14 @@ class infolog_groupdav extends Api\CalDAV\Handler
|
|||||||
$files = array();
|
$files = array();
|
||||||
// ToDo: add parameter to only return id & etag
|
// ToDo: add parameter to only return id & etag
|
||||||
// Please note: $query['start'] get incremented automatically by bo->search() with number of returned rows!
|
// Please note: $query['start'] get incremented automatically by bo->search() with number of returned rows!
|
||||||
while(($tasks =& $this->bo->search($query)))
|
while(($tasks =& $this->bo->search($query)) &&
|
||||||
|
// if $query[cols] is set, bo->search() returns an iterator, which might be empty, in which case we have to stop
|
||||||
|
(is_array($tasks) || $tasks->NumRows()))
|
||||||
{
|
{
|
||||||
|
if ($this->debug)
|
||||||
|
{
|
||||||
|
error_log(__METHOD__ . "(): called bo->search(" . json_encode($query) . ") returned ".(is_array($tasks) ? count($tasks) : $tasks->NumRows())." entries");
|
||||||
|
}
|
||||||
foreach($tasks as $task)
|
foreach($tasks as $task)
|
||||||
{
|
{
|
||||||
// remove task from requested multiget ids, to be able to report not found urls
|
// remove task from requested multiget ids, to be able to report not found urls
|
||||||
@ -366,7 +372,7 @@ class infolog_groupdav extends Api\CalDAV\Handler
|
|||||||
}
|
}
|
||||||
if ($this->debug)
|
if ($this->debug)
|
||||||
{
|
{
|
||||||
error_log(__METHOD__."($path) took ".(microtime(true) - $starttime)." to return $yielded resources");
|
error_log(__METHOD__."($path) took ".(microtime(true) - $starttime)." to return $yielded resources, filter[sync-collection]=$sync_collection_report, sync-token=$this->sync_collection_token");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user