diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-03-07 23:38:44 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-03-07 23:38:44 +0100 |
commit | ae7aab2d6e727f9daf683056001a982aad242c93 (patch) | |
tree | 9dc0ade66c54dc846f4591587393aacd11be8622 /apps/contacts/ajax | |
parent | 91d85e9b1640e9d62707cd1c232c8c7a9fc8b9c3 (diff) | |
parent | d8cfe77ba5348d29a9e2b046e2c7efc1dd4758cb (diff) | |
download | nextcloud-server-ae7aab2d6e727f9daf683056001a982aad242c93.tar.gz nextcloud-server-ae7aab2d6e727f9daf683056001a982aad242c93.zip |
Merge gitorious.org:owncloud/owncloud into vcategories
Conflicts:
apps/contacts/ajax/saveproperty.php
apps/contacts/lib/vcard.php
Diffstat (limited to 'apps/contacts/ajax')
-rw-r--r-- | apps/contacts/ajax/addcard.php | 2 | ||||
-rw-r--r-- | apps/contacts/ajax/addcontact.php | 2 | ||||
-rw-r--r-- | apps/contacts/ajax/addproperty.php | 2 | ||||
-rw-r--r-- | apps/contacts/ajax/deleteproperty.php | 2 | ||||
-rw-r--r-- | apps/contacts/ajax/savecrop.php | 2 | ||||
-rw-r--r-- | apps/contacts/ajax/saveproperty.php | 6 | ||||
-rw-r--r-- | apps/contacts/ajax/setproperty.php | 2 |
7 files changed, 12 insertions, 6 deletions
diff --git a/apps/contacts/ajax/addcard.php b/apps/contacts/ajax/addcard.php index b1dc69a4691..49a4a16170b 100644 --- a/apps/contacts/ajax/addcard.php +++ b/apps/contacts/ajax/addcard.php @@ -92,7 +92,7 @@ foreach( $add as $propname){ } } } -$id = OC_Contacts_VCard::add($aid,$vcard->serialize()); +$id = OC_Contacts_VCard::add($aid,$vcard); if(!$id) { OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('There was an error adding the contact.')))); OC_Log::write('contacts','ajax/addcard.php: Recieved non-positive ID on adding card: '.$id, OC_Log::ERROR); diff --git a/apps/contacts/ajax/addcontact.php b/apps/contacts/ajax/addcontact.php index 5d17631caa4..839a3919981 100644 --- a/apps/contacts/ajax/addcontact.php +++ b/apps/contacts/ajax/addcontact.php @@ -52,7 +52,7 @@ $vcard->setUID(); $vcard->setString('FN',$fn); $vcard->setString('N',$n); -$id = OC_Contacts_VCard::add($aid,$vcard->serialize()); +$id = OC_Contacts_VCard::add($aid,$vcard); if(!$id) { OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('There was an error adding the contact.')))); OC_Log::write('contacts','ajax/addcontact.php: Recieved non-positive ID on adding card: '.$id, OC_Log::ERROR); diff --git a/apps/contacts/ajax/addproperty.php b/apps/contacts/ajax/addproperty.php index a28aed34d2c..e1a31292837 100644 --- a/apps/contacts/ajax/addproperty.php +++ b/apps/contacts/ajax/addproperty.php @@ -116,7 +116,7 @@ foreach ($parameters as $key=>$element) { } $checksum = md5($vcard->children[$line]->serialize()); -if(!OC_Contacts_VCard::edit($id,$vcard->serialize())) { +if(!OC_Contacts_VCard::edit($id,$vcard)) { OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error adding contact property.')))); OC_Log::write('contacts','ajax/addproperty.php: Error updating contact property: '.$name, OC_Log::ERROR); exit(); diff --git a/apps/contacts/ajax/deleteproperty.php b/apps/contacts/ajax/deleteproperty.php index a9afffaad4c..ab0958cac58 100644 --- a/apps/contacts/ajax/deleteproperty.php +++ b/apps/contacts/ajax/deleteproperty.php @@ -39,7 +39,7 @@ if(is_null($line)){ unset($vcard->children[$line]); -if(!OC_Contacts_VCard::edit($id,$vcard->serialize())) { +if(!OC_Contacts_VCard::edit($id,$vcard)) { OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error deleting contact property.')))); OC_Log::write('contacts','ajax/deleteproperty.php: Error deleting contact property', OC_Log::ERROR); exit(); diff --git a/apps/contacts/ajax/savecrop.php b/apps/contacts/ajax/savecrop.php index 1a84f6fdfae..ffbfaeb6e38 100644 --- a/apps/contacts/ajax/savecrop.php +++ b/apps/contacts/ajax/savecrop.php @@ -95,7 +95,7 @@ if(file_exists($tmp_path)) { OC_Log::write('contacts','savecrop.php: files: Adding PHOTO property.', OC_Log::DEBUG); $card->addProperty('PHOTO', $image->__toString(), array('ENCODING' => 'b', 'TYPE' => $image->mimeType())); } - if(!OC_Contacts_VCard::edit($id,$card->serialize())) { + if(!OC_Contacts_VCard::edit($id,$card)) { bailOut('Error saving contact.'); } unlink($tmpfname); diff --git a/apps/contacts/ajax/saveproperty.php b/apps/contacts/ajax/saveproperty.php index e31c4b7c238..3a50d18e6a6 100644 --- a/apps/contacts/ajax/saveproperty.php +++ b/apps/contacts/ajax/saveproperty.php @@ -128,8 +128,14 @@ switch($element) { $checksum = md5($vcard->children[$line]->serialize()); debug('New checksum: '.$checksum); +<<<<<<< HEAD if(!OC_Contacts_VCard::edit($id,$vcard->serialize())) { bailOut(OC_Contacts_App::$l10n->t('Error updating contact property.')); +======= +if(!OC_Contacts_VCard::edit($id,$vcard)) { + OC_JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error updating contact property.')))); + OC_Log::write('contacts','ajax/setproperty.php: Error updating contact property: '.$value, OC_Log::ERROR); +>>>>>>> d8cfe77ba5348d29a9e2b046e2c7efc1dd4758cb exit(); } diff --git a/apps/contacts/ajax/setproperty.php b/apps/contacts/ajax/setproperty.php index f9e2a8e8647..8e07b4a8f1c 100644 --- a/apps/contacts/ajax/setproperty.php +++ b/apps/contacts/ajax/setproperty.php @@ -80,7 +80,7 @@ foreach($missingparameters as $i){ // NOTE: This checksum is not used..? $checksum = md5($vcard->children[$line]->serialize()); -if(!OC_Contacts_VCard::edit($id,$vcard->serialize())) { +if(!OC_Contacts_VCard::edit($id,$vcard)) { OC_JSON::error(array('data' => array('message' => $l->t('Error updating contact property.')))); OC_Log::write('contacts','ajax/setproperty.php: Error updating contact property: '.$value, OC_Log::ERROR); exit(); |