From 2108144edf5dbfe054dde362b33957f2d2e34203 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Tue, 6 Nov 2007 00:28:49 +1300 Subject: [PATCH] Don't duplicate the collection response when we get Depth: infinity --- inc/caldav-PROPFIND.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/caldav-PROPFIND.php b/inc/caldav-PROPFIND.php index 4885aa48..1034acb5 100644 --- a/inc/caldav-PROPFIND.php +++ b/inc/caldav-PROPFIND.php @@ -532,7 +532,7 @@ function get_collection_contents( $depth, $user_no, $collection ) { while( $subcollection = $qry->Fetch() ) { $responses[] = collection_to_xml( $subcollection ); 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; } + /** * Get XML response for a single item. Depth is irrelevant for this. */