From: Bart Visscher Date: Sun, 12 Feb 2012 14:13:30 +0000 (+0100) Subject: Contacts: Save last-modified time in REV property if not set X-Git-Tag: v4.0.0beta~71^2~22 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b77132edbedfc20b975c108989c3f2ff3c8c8df6;p=nextcloud-server.git Contacts: Save last-modified time in REV property if not set --- diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php index 914b480e9b4..d8d1d3ac047 100644 --- a/apps/contacts/lib/app.php +++ b/apps/contacts/lib/app.php @@ -97,6 +97,10 @@ class OC_Contacts_App { $vcard->setString('N', 'Unknown;Name;;;'); } } + if (!is_null($vcard) && !isset($vcard->REV)) { + $rev = new DateTime('@'.$card['lastmodified']); + $vcard->setString('REV', $rev->format(DateTime::W3C)); + } return $vcard; }