From 2ba1d64b0c25521f91c82468463f66faf70c2532 Mon Sep 17 00:00:00 2001 From: Cyprian Guerra Date: Thu, 28 Mar 2019 10:52:32 +0100 Subject: [PATCH 1/3] fixing `Invalid parameter number: :collection_id` --- inc/caldav-PUT-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index e7784dbf..bcdcb3c4 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -1645,7 +1645,7 @@ INSERT INTO calendar_item (user_no, dav_name, dav_id, dav_etag, uid, dtstamp, VALUES ( :user_no, :dav_name, :dav_id, :etag, :uid, :dtstamp, :dtstart, $dtend, :summary, :location, :class, :transp, :description, :rrule, :tzid, :modified, :url, :priority, - :created, :due, :percent_complete, :status, $collection_id, + :created, :due, :percent_complete, :status, :collection_id, :first_instance_start, :last_instance_end) EOSQL; $sync_change = 201; From 8e7866c5505578d5190178ca537efdd36e12a03c Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Tue, 26 Nov 2019 22:24:49 +1300 Subject: [PATCH 2/3] Use a placeholder for another instance of collection_id --- inc/caldav-PUT-functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index bcdcb3c4..b9fee40b 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -1683,7 +1683,8 @@ EOSQL; rollback_on_error( $caldav_context, $user_no, $path); return false; } - $qry->QDo("SELECT write_sync_change( $collection_id, $sync_change, :dav_name)", array(':dav_name' => $path ) ); + $qry->QDo("SELECT write_sync_change( :collection_id, $sync_change, :dav_name)", + array(':collection_id' => $collection_id, :dav_name' => $path ) ); $qry->Commit(); if ( function_exists('post_commit_action') ) { From 65ce5d443e72e842d463bc468477928bd1206007 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Tue, 26 Nov 2019 22:51:37 +1300 Subject: [PATCH 3/3] Fix syntax --- inc/caldav-PUT-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index b9fee40b..1a2fb54c 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -1684,7 +1684,7 @@ EOSQL; return false; } $qry->QDo("SELECT write_sync_change( :collection_id, $sync_change, :dav_name)", - array(':collection_id' => $collection_id, :dav_name' => $path ) ); + array(':collection_id' => $collection_id, ':dav_name' => $path ) ); $qry->Commit(); if ( function_exists('post_commit_action') ) {