diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-01-25 01:10:56 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-01-31 19:30:56 +0100 |
commit | db1f77e4f51b1172aabe12defdd8228e9dd3b93b (patch) | |
tree | 6a52a290fd136ff2cab7717440562c43d109d057 /apps/contacts/ajax/addproperty.php | |
parent | fdf3df3de591845df5255b04eabe12e794faa1f1 (diff) | |
download | nextcloud-server-db1f77e4f51b1172aabe12defdd8228e9dd3b93b.tar.gz nextcloud-server-db1f77e4f51b1172aabe12defdd8228e9dd3b93b.zip |
Some reminders in the code of what I have to change post OC3.0
Diffstat (limited to 'apps/contacts/ajax/addproperty.php')
-rw-r--r-- | apps/contacts/ajax/addproperty.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/contacts/ajax/addproperty.php b/apps/contacts/ajax/addproperty.php index f016820ce5f..a4b5c591197 100644 --- a/apps/contacts/ajax/addproperty.php +++ b/apps/contacts/ajax/addproperty.php @@ -74,6 +74,14 @@ foreach ($parameters as $key=>$element) { } $checksum = md5($vcard->children[$line]->serialize()); +/* FIXME: OC_Contacts_App::getPropertyLineByChecksum throws an OC_JSON error when doing this check. + Fix for v. 3.1 +if(!is_null(OC_Contacts_App::getPropertyLineByChecksum($id, $checksum))) { + OC_JSON::error(array('data' => array('message' => $l->t('Trying to add duplicate property.')))); + OC_Log::write('contacts','ajax/addproperty.php: Trying to add duplicate property: '.$name, OC_Log::DEBUG); + exit(); +} +*/ if(!OC_Contacts_VCard::edit($id,$vcard->serialize())) { OC_JSON::error(array('data' => array('message' => $l->t('Error adding contact property.')))); OC_Log::write('contacts','ajax/addproperty.php: Error updating contact property: '.$name, OC_Log::ERROR); |