From 8e2e01ca9b81680f1b429f834c3fd1b34afb6c65 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Tue, 5 Jun 2007 21:55:19 +1200 Subject: [PATCH] Fix inverted logic around (If-Match|If-None-Match) --- inc/caldav-client.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/caldav-client.php b/inc/caldav-client.php index 5a5f38c9..643714e7 100644 --- a/inc/caldav-client.php +++ b/inc/caldav-client.php @@ -247,7 +247,7 @@ class CalDAVClient { curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, "PUT" ); curl_setopt($this->curl, CURLOPT_HEADER, true); if ( $etag != null ) { - $this->SetMatch( ($etag == '*'), $etag ); + $this->SetMatch( ($etag != '*'), $etag ); } $this->SetContentType("text/icalendar"); $headers = $this->DoRequest($relative_url); @@ -275,7 +275,7 @@ class CalDAVClient { curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, "DELETE" ); curl_setopt($this->curl, CURLOPT_HEADER, true); if ( $etag != null ) { - $this->SetMatch( false, $etag ); + $this->SetMatch( true, $etag ); } $this->DoRequest($relative_url); return $this->resultcode;