mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-30 19:52:17 +01:00
Don't set checksum for non-existing property.
This commit is contained in:
parent
f877dd7339
commit
4890bdf705
@ -18,17 +18,21 @@ if(is_null($id)) {
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
$vcard = OC_Contacts_App::getContactVCard( $id );
|
$vcard = OC_Contacts_App::getContactVCard( $id );
|
||||||
foreach($vcard->children as $property) {
|
if(isset($vcard->CATEGORIES)) {
|
||||||
if($property->name == 'CATEGORIES') {
|
foreach($vcard->children as $property) {
|
||||||
$checksum = md5($property->serialize());
|
if($property->name == 'CATEGORIES') {
|
||||||
OCP\JSON::success(array(
|
$checksum = md5($property->serialize());
|
||||||
'data' => array(
|
OCP\JSON::success(array(
|
||||||
'value' => $property->value,
|
'data' => array(
|
||||||
'checksum' => $checksum,
|
'value' => $property->value,
|
||||||
)));
|
'checksum' => $checksum,
|
||||||
exit();
|
)));
|
||||||
|
exit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
OCP\JSON::error(array(
|
||||||
OCP\JSON::error(array(
|
'data' => array(
|
||||||
'data' => array(
|
'message' => OC_Contacts_App::$l10n->t('Error setting checksum.'))));
|
||||||
'message' => OC_Contacts_App::$l10n->t('Error setting checksum.'))));
|
} else {
|
||||||
|
OCP\JSON::success();
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user