summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-02-12 15:13:30 +0100
committerBart Visscher <bartv@thisnet.nl>2012-02-12 15:14:25 +0100
commitb77132edbedfc20b975c108989c3f2ff3c8c8df6 (patch)
treec9914e29408da82cbdba86814b298cd32fed50f0 /apps
parent6bd0aad1174f2625560d2a6c1b0138ad5f6cc3fb (diff)
downloadnextcloud-server-b77132edbedfc20b975c108989c3f2ff3c8c8df6.tar.gz
nextcloud-server-b77132edbedfc20b975c108989c3f2ff3c8c8df6.zip
Contacts: Save last-modified time in REV property if not set
Diffstat (limited to 'apps')
-rw-r--r--apps/contacts/lib/app.php4
1 files changed, 4 insertions, 0 deletions
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;
}