<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Thomas,<br>
<br>
Thanks for your feedback.<br>
I talked with my developers. They are deleting and re-adding the
contacts :)<br>
But they say that there is no edit method in the webdav client
called WebDAV .NET<br>
<br>
by the way we also delete and re-add the caldav events, owncloud
use our LAST-MODIFIED value in the .ics file<br>
Then we thought that something is wrong with carddav?<br>
<br>
My question is what is the proper way to handle update
caldav/carddav?<br>
<br>
<br>
<br>
Thanks<br>
On 3.5.2013 15:41, Thomas Tanghus wrote:<br>
</div>
<blockquote cite="mid:1411125.7ePvFYdUE8@tanghus" type="cite">
<pre wrap="">Hi Ismail
When adding new contacts their properties may get updated because we store
them internally as vCard 3.0, and because we then can't guarantee that the
contact is identical after adding, the REV property is updated.
The method you mention is *only* called when adding contacts, so my guess is
it's rather in the edit() method [1] it gets updated. I hope you're not
syncing by deleting and re-adding the vCards? ;)
It's a valid issue, and I will see to change it so that if contacts are
updated via CardDAV the REV will only be updated/added if it doesn't exist.
BTW, wouldn't it be a more reliable method to check for the Etag being send?
It is my understanding that most *DAV sync clients use that.
[1] <a class="moz-txt-link-freetext" href="https://github.com/owncloud/apps/blob/stable5/contacts/lib/vcard.php#L513">https://github.com/owncloud/apps/blob/stable5/contacts/lib/vcard.php#L513</a>
On Friday 03 May 2013 12:13 Ismail YENIGUL wrote:
</pre>
<blockquote type="cite">
<pre wrap="">We developed a outlook contacts and calendar sync from a caldav/carddav
server.
We are making tests on owncloud. There is no problem with calendar part.
But we have a problem about update date of the contacts. We create a vcf
file on the client side that contains REV field like the following
PRODID:-//ownCloud//NONSGML Contacts 0.2.5//EN
*REV:2013-04-29T13:40:53+00:00*
FN:Yusuf Cemal
N:Cemal;Yusuf;;
...
When we upload this file to owncloud via DAV. Owncloud does not take
care of this field and inserts own "last change date" to the database.
This causes continues update for the same contacts on the outlook side.
Is there any way to disable auto update of last change on the owncloud
side if the REV is defined in VCF file.
It seems that the problem is at the following lines:
# vi apps/contacts/lib/vcard.php
/**
* @brief Tries to update imported VCards to adhere to rfc2426
(VERSION: 3.0) and add mandatory fields if missing.
* @param aid Address book id.
* @param vcard A Sabre\VObject\Component of type VCARD (passed
by reference).
*/
protected static function *updateValuesFromAdd*($aid, &$vcard)
{ // any suggestions for a better method name? ;-)
}
if(self::trueUID($aid, $uid)) {
$vcard->{'UID'} = $uid;
}
*$now = new \DateTime;**
** $vcard->{'REV'} = $now->format(\DateTime::W3C);*
}
Thanks
</pre>
</blockquote>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Signature</title>
<table style="text-align: left; width: 491px; height: 136px;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="vertical-align: top;"><br>
<br>
<div style="text-align: left;"><img style="width: 240px;
height: 63px;" alt="Surgate Logo"
src="cid:part1.03020108.06020109@surgate.com"><br>
</div>
<br>
</td>
<td style="vertical-align: top; text-align: right;"><span
style="font-family: Helvetica,Arial,sans-serif; color:
rgb(56, 103, 153); font-weight: bold;">Ismail YENIGUL</span><br
style="font-family: Helvetica,Arial,sans-serif; color:
rgb(56, 103, 153); font-weight: bold;">
<small style="color: rgb(56, 103, 153); font-weight:
bold;"><span style="font-family:
Helvetica,Arial,sans-serif;">CTO</span></small><br
style="font-weight: bold;">
<br>
<small style="color: rgb(42, 136, 153);"><span
style="font-family: Helvetica,Arial,sans-serif;">Tel:
+90 533 747 3665</span><br style="font-family:
Helvetica,Arial,sans-serif;">
<span style="font-family: Helvetica,Arial,sans-serif;">Fax:
0216 470 95 08</span><br style="font-family:
Helvetica,Arial,sans-serif;">
<span style="font-family: Helvetica,Arial,sans-serif;"><a class="moz-txt-link-abbreviated" href="mailto:ismail.yenlgul@surgate.com">ismail.yenlgul@surgate.com</a></span><br
style="font-family: Helvetica,Arial,sans-serif;">
<span style="font-family: Helvetica,Arial,sans-serif;"><a class="moz-txt-link-abbreviated" href="http://www.surgatelabs.com">www.surgatelabs.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.srntools.com">www.srntools.com</a></span></small><big><br>
<br>
</big></td>
</tr>
</tbody>
</table>
<br>
<br>
</div>
<br>
<br>
</body>
</html>