1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00
This commit is contained in:
LEDfan 2014-04-02 20:31:57 +02:00
parent dd68af97e4
commit fa4839c6ae

View File

@ -271,26 +271,6 @@ class OwnCloudUsers extends AbstractBackend {
}
}
if (is_array($id)) {
if (isset($id['id'])) {
$id = $id['id'];
} elseif (isset($id['uri'])) {
$updateRevision = false;
$isCardDAV = true;
$id = $this->getIdFromUri($id['uri']);
if (is_null($id)) {
\OCP\Util::writeLog('contacts', __METHOD__ . ' Couldn\'t find contact', \OCP\Util::ERROR);
return false;
}
} else {
throw new \Exception(
__METHOD__ . ' If second argument is an array, either \'id\' or \'uri\' has to be set.'
);
}
}
if ($updateRevision || !isset($contact->REV)) {
$now = new \DateTime;
$contact->REV = $now->format(\DateTime::W3C);