From 19de9d3b0148e90766e97d00d7a8df0816613381 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 11 Sep 2010 22:48:36 +1200 Subject: [PATCH] [sync-collection report] Fix to work with bound collections. The sync-collection report was looking for $request->CollectionID() but this is not set for bound collections and we have to use DAVResource methods to retrieve it. --- inc/caldav-REPORT-sync-collection.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/caldav-REPORT-sync-collection.php b/inc/caldav-REPORT-sync-collection.php index 0e8f170c..469d06ce 100644 --- a/inc/caldav-REPORT-sync-collection.php +++ b/inc/caldav-REPORT-sync-collection.php @@ -33,7 +33,9 @@ function display_status( $status_code ) { return sprintf( 'HTTP/1.1 %03d %s', intval($status_code), getStatusMessage($status_code) ); } -$params = array( ':collection_id' => $request->CollectionId(), ':sync_token' => $sync_token ); +$collection = new DAVResource( $request->path ); + +$params = array( ':collection_id' => $collection->GetProperty('collection_id'), ':sync_token' => $sync_token ); $sql = "SELECT new_sync_token( :sync_token, :collection_id)"; $qry = new AwlQuery($sql, $params); if ( !$qry->Exec("REPORT",__LINE__,__FILE__) || $qry->rows() <= 0 ) {