From 9fdaef2bd1ef16163d9f126a5b70e5857af5a653 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sun, 21 Nov 2010 00:51:20 +1300 Subject: [PATCH] Use the commit() method rather than a commit statement. --- inc/caldav-PUT-vcard.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/caldav-PUT-vcard.php b/inc/caldav-PUT-vcard.php index 9a1f6d0e..5ce77113 100644 --- a/inc/caldav-PUT-vcard.php +++ b/inc/caldav-PUT-vcard.php @@ -91,7 +91,10 @@ $vcard->Write( $row->dav_id, $dest->Exists() ); $qry->QDo("SELECT write_sync_change( $collection_id, $response_code, :dav_name)", array(':dav_name' => $dest->bound_from() ) ); -if ( !$qry->QDo('COMMIT') ) rollback(500); +if ( !$qry->Commit() ) { + $qry->Rollback(); + $request->DoResponse( 500, "A database error occurred" ); +} header('ETag: "'. $etag . '"' ); if ( $response_code == 200 ) $response_code = 204;