mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-02-12 03:14:31 +00:00
Fix handling of DELETE followed by CREATE case.
This commit is contained in:
parent
f3ec8622e9
commit
f8331aab2d
@ -72,7 +72,7 @@ if ( $qry->Exec("REPORT",__LINE__,__FILE__) ) {
|
||||
if ( $object->dav_id == $last_dav_id ) {
|
||||
/** The complex case: this is the second or subsequent for this dav_id */
|
||||
if ( $object->sync_status == 404 ) {
|
||||
if ( $first_action == 201 ) {
|
||||
if ( $first_status == 201 ) {
|
||||
array_pop($responses);
|
||||
$last_dav_id = -1;
|
||||
$first_status = 0;
|
||||
@ -87,6 +87,15 @@ if ( $qry->Exec("REPORT",__LINE__,__FILE__) ) {
|
||||
$first_status = 404;
|
||||
}
|
||||
}
|
||||
else if ( $object->sync_status == 201 && $first_status == 404 ) {
|
||||
// ... Delete ... Create ... is indicated as a create, but don't forget we started with a delete
|
||||
array_pop($responses);
|
||||
$resultset = array(
|
||||
new XMLElement( 'href', ConstructURL($object->dav_name) ),
|
||||
new XMLElement( 'status', display_status($object->sync_status) )
|
||||
);
|
||||
$responses[] = new XMLElement( 'sync-response', $resultset );
|
||||
}
|
||||
/** Else:
|
||||
* the object existed at start and we have multiple modifications,
|
||||
* or,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user