adds fallback value if VCARD has no valid family or org name
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 7 May 2015 14:28:38 +0000 (16:28 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 7 May 2015 14:41:38 +0000 (16:41 +0200)
Change-Id: Ie63a90322fb167b74a1d9d6c2b4d95874c49909a
Reviewed-on: http://gerrit.tine20.com/customers/1916
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Addressbook/Convert/Contact/VCard/Abstract.php

index 4774e7e..6c13c3a 100644 (file)
@@ -209,7 +209,7 @@ abstract class Addressbook_Convert_Contact_VCard_Abstract implements Tinebase_Co
                 $data['n_given']  = trim($firstname);
                 
             } else {
-                $data['n_family'] = $data['n_fn'];
+                $data['n_family'] = empty($data['n_fn']) ? 'VCARD (imported)' : $data['n_fn'];
             }
         }