mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-28 03:04:15 +00:00
Don't duplicate the collection response when we get Depth: infinity
This commit is contained in:
parent
3005cb4689
commit
2108144edf
@ -532,7 +532,7 @@ function get_collection_contents( $depth, $user_no, $collection ) {
|
|||||||
while( $subcollection = $qry->Fetch() ) {
|
while( $subcollection = $qry->Fetch() ) {
|
||||||
$responses[] = collection_to_xml( $subcollection );
|
$responses[] = collection_to_xml( $subcollection );
|
||||||
if ( $depth > 0 ) {
|
if ( $depth > 0 ) {
|
||||||
$responses = array_merge( $responses, get_collection( $depth - 1, $user_no, $subcollection->dav_name ) );
|
$responses = array_merge( $responses, get_collection_contents( $depth - 1, $user_no, $subcollection ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -616,6 +616,7 @@ function get_collection( $depth, $user_no, $collection_path ) {
|
|||||||
return $responses;
|
return $responses;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get XML response for a single item. Depth is irrelevant for this.
|
* Get XML response for a single item. Depth is irrelevant for this.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user