Skip to content
Snippets Groups Projects
Commit a7587048 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

Use correct class.

parent db5b995a
No related branches found
No related tags found
No related merge requests found
......@@ -49,10 +49,14 @@ if(!$id) {
exit();
}
$lastmodified = OC_Contacts_App::lastModified($vcard);
if(!$lastmodified) {
$lastmodified = new DateTime();
}
OCP\JSON::success(array(
'data' => array(
'id' => $id,
'aid' => $aid,
'lastmodified' => OC_Contacts_VCard::lastModified($vcard)->format('U')
'lastmodified' => $lastmodified->format('U')
)
));
......@@ -50,9 +50,13 @@ if(isset($details['PHOTO'])) {
} else {
$details['PHOTO'] = false;
}
$lastmodified = OC_Contacts_App::lastModified($vcard);
if(!$lastmodified) {
$lastmodified = new DateTime();
}
$details['id'] = $id;
$details['displayname'] = $card['fullname'];
$details['addressbookid'] = $card['addressbookid'];
$details['lastmodified'] = OC_Contacts_App::lastModified($vcard)->format('U');
$details['lastmodified'] = $lastmodified->format('U');
OC_Contacts_App::setLastModifiedHeader($vcard);
OCP\JSON::success(array('data' => $details));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment