diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-09-15 11:06:21 +0200 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-09-15 11:06:21 +0200 |
commit | c3ff534b19ec50dac75c6d1e54dff1d349f85000 (patch) | |
tree | 436e8515011eb488bb7a8d42906996a3d155779c /apps/contacts/ajax/deleteproperty.php | |
parent | b6c69e580a5f89026a59d380a4cfe42a84a53680 (diff) | |
download | nextcloud-server-c3ff534b19ec50dac75c6d1e54dff1d349f85000.tar.gz nextcloud-server-c3ff534b19ec50dac75c6d1e54dff1d349f85000.zip |
Improve reading of vCard files
Diffstat (limited to 'apps/contacts/ajax/deleteproperty.php')
-rw-r--r-- | apps/contacts/ajax/deleteproperty.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/contacts/ajax/deleteproperty.php b/apps/contacts/ajax/deleteproperty.php index f73758a3676..52adca877f5 100644 --- a/apps/contacts/ajax/deleteproperty.php +++ b/apps/contacts/ajax/deleteproperty.php @@ -48,13 +48,13 @@ if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){ exit(); } +$vcard = OC_Contacts_Addressbook::parse($card['carddata']); // Check if the card is valid -if( !OC_Contacts_Addressbook::isValidVObject($card['carddata'])){ +if(is_null($vcard)){ echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Unable to parse vCard!')))); exit(); } -$vcard = Sabre_VObject_Reader::read($card['carddata']); $line = null; for($i=0;$i<count($vcard->children);$i++){ if(md5($vcard->children[$i]->serialize()) == $checksum ){ |