mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
If data is already a Horde_iCalendar object, use it instead of creating a new one
This commit is contained in:
parent
65bf21742a
commit
67289c346b
@ -553,12 +553,17 @@ class addressbook_vcal extends addressbook_bo
|
||||
|
||||
require_once(EGW_SERVER_ROOT.'/phpgwapi/inc/horde/Horde/iCalendar.php');
|
||||
|
||||
$container = false;
|
||||
$vCard = Horde_iCalendar::newComponent('vcard', $container);
|
||||
|
||||
if (!$vCard->parsevCalendar($_vcard, 'VCARD', $charset))
|
||||
if(!($_vcard instanceof Horde_iCalendar))
|
||||
{
|
||||
return False;
|
||||
$container = false;
|
||||
$vCard = Horde_iCalendar::newComponent('vcard', $container);
|
||||
|
||||
if (!$vCard->parsevCalendar($_vcard, 'VCARD', $charset))
|
||||
{
|
||||
return False;
|
||||
}
|
||||
} else {
|
||||
$vCard = $_vcard;
|
||||
}
|
||||
$vcardValues = $vCard->getAllAttributes();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user