summaryrefslogtreecommitdiffstats
path: root/apps/contacts/lib/vcard.php
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-05-10 16:53:25 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-05-10 16:53:25 +0200
commit2c6740b0c72a4e3c66dd63e2c687d90c547b226e (patch)
treee3327e681d3c904551b3630f627d5d8b6e3f0140 /apps/contacts/lib/vcard.php
parentddd991a59e767c593fab7c4ea238fe8b32bd3fe7 (diff)
downloadnextcloud-server-2c6740b0c72a4e3c66dd63e2c687d90c547b226e.tar.gz
nextcloud-server-2c6740b0c72a4e3c66dd63e2c687d90c547b226e.zip
Some UI and code restructering according to usability tests: https://mail.kde.org/pipermail/owncloud/2012-May/003194.html
Diffstat (limited to 'apps/contacts/lib/vcard.php')
-rwxr-xr-xapps/contacts/lib/vcard.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php
index eb33d223071..c2ab0e07e91 100755
--- a/apps/contacts/lib/vcard.php
+++ b/apps/contacts/lib/vcard.php
@@ -261,19 +261,20 @@ class OC_Contacts_VCard{
* @param string $uri the uri of the card, default based on the UID
* @return insertid on success or null if no card.
*/
- public static function add($aid, OC_VObject $card, $uri=null){
+ public static function add($aid, OC_VObject $card, $uri=null, $isnew=false){
if(is_null($card)){
OCP\Util::writeLog('contacts','OC_Contacts_VCard::add. No vCard supplied', OCP\Util::ERROR);
return null;
};
- OC_Contacts_App::loadCategoriesFromVCard($card);
-
- self::updateValuesFromAdd($aid, $card);
+ if(!$isnew) {
+ OC_Contacts_App::loadCategoriesFromVCard($card);
+ self::updateValuesFromAdd($aid, $card);
+ }
$fn = $card->getAsString('FN');
if (empty($fn)) {
- $fn = null;
+ $fn = '';
}
if (!$uri) {