diff --git a/inc/DAVResource.php b/inc/DAVResource.php index 5ca4f3f0..9316f361 100644 --- a/inc/DAVResource.php +++ b/inc/DAVResource.php @@ -1597,6 +1597,7 @@ EOQRY; case 'urn:ietf:params:xml:ns:carddav:address-data': case 'urn:ietf:params:xml:ns:caldav:calendar-data': if ( $this->_is_collection ) return false; + if ( !isset($c->sync_resource_data_ok) || $c->sync_resource_data_ok == false ) return false; if ( !isset($this->resource) ) $this->FetchResource(); $reply->NSElement($prop, $tag, $this->resource->caldav_data ); break; diff --git a/inc/caldav-REPORT-sync-collection.php b/inc/caldav-REPORT-sync-collection.php index 19f0820b..be6fbeb0 100644 --- a/inc/caldav-REPORT-sync-collection.php +++ b/inc/caldav-REPORT-sync-collection.php @@ -91,6 +91,10 @@ EOSQL; $first_status = 0; if ( $qry->Exec("REPORT",__LINE__,__FILE__) ) { + if ( $qry->rows() > 50 ) { + // If there are more than 50 rows to send we should not send full data in response ... + $c->sync_resource_data_ok = false; + } while( $object = $qry->Fetch() ) { if ( $object->dav_name == $last_dav_name ) { /** The complex case: this is the second or subsequent for this dav_id */