@@ -356,7 +356,7 @@ public function browse($path = '',
356356 }
357357 if (in_array ('contentlength ' , $ properties )) {
358358 try {
359- $ data = $ this ->export ($ contact ->getValue ('__uid ' ), 'text/x-vcard ' , $ contact ->getSource ());
359+ $ data = $ this ->export ($ contact ->getValue ('__uid ' ), 'text/x-vcard ' , $ contact ->getSource (), null , array ( ' skip_empty ' => true ) );
360360 } catch (Turba_Exception $ e ) {
361361 $ data = '' ;
362362 }
@@ -387,7 +387,7 @@ public function browse($path = '',
387387 $ contact = $ driver ->getObject ($ parts [2 ]);
388388
389389 $ result = array (
390- 'data ' => $ this ->export ($ contact ->getValue ('__uid ' ), 'text/x-vcard ' , $ contact ->getSource ()),
390+ 'data ' => $ this ->export ($ contact ->getValue ('__uid ' ), 'text/x-vcard ' , $ contact ->getSource (), null , array ( ' skip_empty ' => true ) ),
391391 'mimetype ' => 'text/x-vcard '
392392 );
393393 $ modified = $ this ->_modified ($ contact ->getValue ('__uid ' ), $ parts [1 ]);
@@ -818,7 +818,7 @@ public function export($uid, $contentType, $sources = null, $fields = null, arra
818818 case 'text/directory ' :
819819 $ export = '' ;
820820 foreach ($ result ->objects as $ obj ) {
821- $ vcard = $ sdriver ->tovCard ($ obj , $ version , $ fields );
821+ $ vcard = $ sdriver ->tovCard ($ obj , $ version , $ fields, ! empty ( $ options [ ' skip_empty ' ]) );
822822 /* vCards are not enclosed in
823823 * BEGIN:VCALENDAR..END:VCALENDAR. Export the individual
824824 * cards instead. */
0 commit comments