* CalDAV/GroupDAV: disabling not working iterator, causing not all events to be returned to client

This commit is contained in:
Ralf Becker 2011-07-08 08:01:33 +00:00
parent 356d4b0db6
commit 816cae2dfa

View File

@ -172,12 +172,13 @@ class calendar_groupdav extends groupdav_handler
}
}
}
/* disabling not working iterator
// return iterator, calling ourself to return result in chunks
$files['files'] = new groupdav_propfind_iterator($this,$path,$filter,$files['files']);
return true;
}
*/
/**
* Callback for profind interator
*
@ -186,13 +187,16 @@ class calendar_groupdav extends groupdav_handler
* @param array|boolean $start=false false=return all or array(start,num)
* @return array with "files" array with values for keys path and props
*/
function propfind_callback($path,array $filter,$start=false)
/* disabling not working iterator
function propfind_callback($path,array $filter,$start=false)
{
*/
if ($this->debug) $starttime = microtime(true);
$calendar_data = $filter['calendar_data'];
unset($filter['calendar_data']);
/* disabling not working iterator
$files = array();
if (is_array($start))
@ -200,6 +204,7 @@ class calendar_groupdav extends groupdav_handler
$filter['offset'] = $start[0];
$filter['num_rows'] = $start[1];
}
*/
$events =& $this->bo->search($filter);
if ($events)
{
@ -240,9 +245,12 @@ class calendar_groupdav extends groupdav_handler
{
$props[] = HTTP_WebDAV_Server::mkprop('getcontentlength', ''); // expensive to calculate and no CalDAV client uses it
}
/* disabling not working iterator
$files[] = array(
'path' => $path.$this->get_path($event),
'props' => $props,
*/
$files['files'][] = array(
'path' => $path.$this->get_path($event),
'props' => $props,
);
}
}
@ -251,7 +259,10 @@ class calendar_groupdav extends groupdav_handler
error_log(__METHOD__."($path) took ".(microtime(true) - $starttime).
' to return '.count($files['files']).' items');
}
/* disabling not working iterator
return $files;
*/
return true;
}
/**