Only export non-empty fields.
authorJan Schneider <jan@horde.org>
Mon, 1 Mar 2010 15:42:14 +0000 (16:42 +0100)
committerJan Schneider <jan@horde.org>
Mon, 1 Mar 2010 15:42:14 +0000 (16:42 +0100)
turba/lib/Api.php
turba/vcard.php

index f9061d0..a709bac 100644 (file)
@@ -815,7 +815,7 @@ class Turba_Api extends Horde_Registry_Api
         if ($driver instanceof PEAR_Error) {
             throw new Horde_Exception(sprintf(_("Connection failed: %s"), $driver->getMessage()));
         }
-        $vcard = $driver->tovCard($contact['contact'], '3.0');
+        $vcard = $driver->tovCard($contact['contact'], '3.0', null, true);
         $vcard->setAttribute('VERSION', '3.0');
 
         return $vcard->exportvCalendar();
index 22d1d17..dd4b04b 100644 (file)
@@ -43,4 +43,4 @@ $filename = str_replace(' ', '_', $object->getValue('name'));
 if (!$filename) {
     $filename = _("contact");
 }
-$vcard->exportFile($filename . '.vcf', array($driver->tovCard($object)), Horde_Nls::getCharset());
+$vcard->exportFile($filename . '.vcf', array($driver->tovCard($object, '2.1', null, true)), Horde_Nls::getCharset());