When doing a PROPFIND on default-calendar-url, if the current default calendar (fallbacking on personal uri)
is in the trashbin, it's being purged so that it's recreated.
This leads to loss of data.
We can simply rename the calendar URI and add a unique suffix so that it doesn't conflict with the new calendar
being created.
Shares are fine because they reference the resourceid and not the calendar URI.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Reject calendars that
- are subscriptions
- are not writable
- are shared with a user
- are deleted
- don't support VEVENTs
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
If there's no default calendar and we can't find anything with URI
'personal', instead of creating a new one, start by using the first
"real personal calendar" available.
If not, then we create the default one.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>