Fix inverted logic around (If-Match|If-None-Match)

This commit is contained in:
Andrew McMillan 2007-06-05 21:55:19 +12:00
parent bda235141a
commit 8e2e01ca9b

View File

@ -247,7 +247,7 @@ class CalDAVClient {
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, "PUT" ); curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, "PUT" );
curl_setopt($this->curl, CURLOPT_HEADER, true); curl_setopt($this->curl, CURLOPT_HEADER, true);
if ( $etag != null ) { if ( $etag != null ) {
$this->SetMatch( ($etag == '*'), $etag ); $this->SetMatch( ($etag != '*'), $etag );
} }
$this->SetContentType("text/icalendar"); $this->SetContentType("text/icalendar");
$headers = $this->DoRequest($relative_url); $headers = $this->DoRequest($relative_url);
@ -275,7 +275,7 @@ class CalDAVClient {
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, "DELETE" ); curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, "DELETE" );
curl_setopt($this->curl, CURLOPT_HEADER, true); curl_setopt($this->curl, CURLOPT_HEADER, true);
if ( $etag != null ) { if ( $etag != null ) {
$this->SetMatch( false, $etag ); $this->SetMatch( true, $etag );
} }
$this->DoRequest($relative_url); $this->DoRequest($relative_url);
return $this->resultcode; return $this->resultcode;