mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-25 02:34:17 +00:00
Try to short-circuit so we only do expansion if we know we need it.
This commit is contained in:
parent
b4e50d8803
commit
612ac73a30
@ -341,7 +341,11 @@ if ( $qry->Exec("calquery",__LINE__,__FILE__) && $qry->rows() > 0 ) {
|
|||||||
}
|
}
|
||||||
if ( $need_expansion ) {
|
if ( $need_expansion ) {
|
||||||
$vResource = new vComponent($dav_object->caldav_data);
|
$vResource = new vComponent($dav_object->caldav_data);
|
||||||
|
$expanded = getVCalendarRange($vResource);
|
||||||
|
if ( !$expanded->overlaps($range_filter) ) continue;
|
||||||
|
|
||||||
$expanded = expand_event_instances($vResource, $expand_range_start, $expand_range_end, $expand_as_floating );
|
$expanded = expand_event_instances($vResource, $expand_range_start, $expand_range_end, $expand_as_floating );
|
||||||
|
|
||||||
if ( $expanded->ComponentCount() == 0 ) continue;
|
if ( $expanded->ComponentCount() == 0 ) continue;
|
||||||
if ( $need_expansion ) $dav_object->caldav_data = $expanded->Render();
|
if ( $need_expansion ) $dav_object->caldav_data = $expanded->Render();
|
||||||
}
|
}
|
||||||
@ -356,6 +360,7 @@ if ( $qry->Exec("calquery",__LINE__,__FILE__) && $qry->rows() > 0 ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$multistatus = new XMLElement( "multistatus", $responses, $reply->GetXmlNsArray() );
|
$multistatus = new XMLElement( "multistatus", $responses, $reply->GetXmlNsArray() );
|
||||||
|
|
||||||
$request->XMLResponse( 207, $multistatus );
|
$request->XMLResponse( 207, $multistatus );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user