Strip out item groups from Apple Addressbook before processing

This commit is contained in:
Nathan Gray 2012-09-24 16:05:52 +00:00
parent f224fe5852
commit b3d463631a

View File

@ -117,7 +117,10 @@ class addressbook_import_vcard implements importexport_iface_import_plugin {
// Failures
$this->errors = array();
$contacts = new egw_ical_iterator($_stream, '', $charset, array($this, '_vcard'),array(
// Fix for Apple Addressbook
$vCard = preg_replace('/item\d\.(ADR|TEL|EMAIL|URL)/', '\1', stream_get_contents($_stream));
$contacts = new egw_ical_iterator($vCard, '', $charset, array($this, '_vcard'),array(
// Owner (addressbook)
$contact_owner
));