38 Commits

Author SHA1 Message Date
Jamie McClymont
c4321dac9f Fix excessive SQL queries in calendar-sync REPORT
The calendar-sync REPORT fetches the collection as a DAVResource, then
instantiates a DAVResource for each event in the collection.

Unfortunately, ByRow in DAVResource fetches the resource's collection from the
database!

This commit populates each DAVResource's collection field with the
already-fetched collection when performing calendar-sync queries.
2019-01-04 14:13:41 +13:00
Scott Balneaves
8052111635 modify hide_older_than logic to allow through recurring events (fixes #103, !36) 2017-04-07 15:08:10 +02:00
Florian Schlichting
1c174f4b78 fix sync of deleted events when hide_todo is set (fixes #100)
thanks Jerome Borsboom @hinotori
2017-04-07 14:29:42 +02:00
Florian Schlichting
eb7f2edc0c eliminate trailing whitespace, expand tabs 2016-12-30 08:52:44 +01:00
Andrew McMillan
b7cc11a329 The str_ireplace() function is not always present. 2016-06-22 23:04:52 +01:00
Ján Máté
c2b6be3b65 fix for $c->hide_TODO processing and user-agent extension
new option: if set to PHP regex string then hide_TODO is enabled if the client
user-agent string matches the regex for example:
    $c->hide_TODO='#^iOS.*dataaccessd.*#';
will hide all todos from non-owner/non-admin users for iOS devices
2013-10-25 12:16:27 +13:00
Christoph Anton Mitterer
8e60bb3124 set line endings of most text files to LF
* Changed the end-of-line encodings of all non-Windows-related and non-autogenerated text files to use UNIX LF (lots of them had mixed LF/CRLF).

Conflicts:
	inc/caldav-PUT-functions.php
2013-09-02 14:37:23 +12:00
Andrew McMillan
6695b46160 Avoid unassigned variable warning. 2012-09-20 23:34:18 +12:00
Andrew McMillan
7e1a5905ad Fix notification of deletes when hide_older_than is set. 2012-06-21 22:00:23 +12:00
Andrew McMillan
649be5b452 Add support for $c->hide_older_than to this report.
Based on a suggestion from Ján Máté.
2012-05-28 07:37:41 +12:00
Andrew McMillan
2808bab03b Simplify using GetPath() method. 2012-05-20 21:42:54 +12:00
Andrew McMillan
acc6c719f7 Simple changes for new XML processing. 2012-04-30 14:13:03 +12:00
Andrew McMillan
7c15051f84 Further fixes to WebDAV synchronization.
This should be fully reliable now and also cleans out all sync
changes more than one week old.  update-database is needed to pull
the new function.
2012-04-17 15:44:09 +12:00
Andrew McMillan
70222291c7 Formatting changes. 2012-03-02 08:57:38 +13:00
Andrew McMillan
a29968a6cd Detect unsupported sync-level and return specified error.
This covers the -08 of the webdav synchronisation draft.
2012-02-05 09:45:00 -08:00
Andrew McMillan
71b90d367a Handle bound resources correctly in sync-collection report. 2011-12-14 22:18:24 +13:00
Andrew McMillan
3929c55c9d The 404 section of a sync-report response should be a <response>
Hangover from old code.
2011-11-24 15:32:17 +13:00
Andrew McMillan
606043b5df Handle strict result ordering for regression tests. 2011-11-21 10:54:17 +13:00
Andrew McMillan
323e6a3011 The final revision of the sync-collection report requires the token to be a URI.
We'll use a 'data' URI (like CalendarServer does) to jump through this
arbitrary hoop.
2011-10-03 16:29:11 +02:00
Andrew McMillan
b301a36aca When sync-collection is asked for data, only return it if < 50 rows.
The resource data element is not *actually* allowed, per the spec, but
some clients do use it, and some servers do support it.  In the case
of an initial sync which requests it we don't want to send down a huge
response to an ill-considered client.
2011-05-13 14:54:28 +12:00
Andrew McMillan
4e12eb82e4 Update sync-collection REPORT to match -04 of draft. 2010-11-30 12:31:25 +13:00
Andrew McMillan
0a59903259 Support event properties in changed part of sync-response. 2010-11-04 08:40:52 +13:00
Andrew McMillan
7e4364c803 If we get NULL for a new sync token reset so we sync everything. 2010-09-25 22:27:49 +12:00
Andrew McMillan
b80dd10c7b Add a configuration option to use the older 'sync-response' tag.
When the WebDAV sync draft first came out the responses were each
contained in a DAV::sync-response tag, but by -03 this has changed
to a DAV::response tag since the format of the tag contents now
match this existing tag structure.

Unfortunately some client software in the wild depends on this
being a DAV::sync-response so the config option is needed to
interoperate with this software.
2010-09-25 17:18:54 +12:00
Andrew McMillan
dd1d3903ff Make the sync report work with non-calendar resources. 2010-09-23 23:21:11 +12:00
Andrew McMillan
19de9d3b01 [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.
2010-09-11 22:48:36 +12:00
Andrew McMillan
2898fb2b23 In -03 the response is renamed to 'response' rather than 'sync-response' 2010-08-18 21:35:02 +12:00
Andrew McMillan
ff0bef2f8b Migrate sync-collection REPORT to AwlQuery. 2010-03-17 13:52:57 +13:00
Andrew McMillan
5384d175e9 Well, it seems webdav-sync needs to change to always report delete.
This will become part of the spec in the next revision.
2010-02-03 10:40:05 -08:00
Andrew McMillan
0b9cdd593b Another fix for the webdav-sync to collapse create/delete properly. 2010-02-03 09:57:20 -08:00
Andrew McMillan
5fac9850db We should be getting the sync_changes data last.
This is so we get dav_name correct for delete actions, which
will otherwise be null since there is no caldav_data or
calendar_item record for them any longer.
2010-02-03 09:04:40 -08:00
Andrew McMillan
8f87ef4ff9 Move DAVResource inclusion to REPORT wrapper. 2009-12-28 00:25:31 +13:00
Andrew McMillan
f8331aab2d Fix handling of DELETE followed by CREATE case. 2009-12-08 09:24:34 +13:00
Andrew McMillan
865a2e499c Various changes preparing to switch PROPFIND implementation. 2009-11-12 00:39:18 +13:00
Andrew McMillan
5bab699e14 Collapse changes in sync-collection response. 2009-10-15 23:13:39 +13:00
Andrew McMillan
24a8971080 Initial support for draft-daboo-webdav-sync-01 2009-10-13 21:29:40 +13:00
Andrew McMillan
3d883e975d Start of sync-collection report. 2009-10-11 15:01:27 -07:00
Andrew McMillan
0cda2cb469 [Unfinished] Starting to change permissions. 2009-10-11 14:58:35 -07:00