mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +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');
|
require_once(EGW_SERVER_ROOT.'/phpgwapi/inc/horde/Horde/iCalendar.php');
|
||||||
|
|
||||||
$container = false;
|
if(!($_vcard instanceof Horde_iCalendar))
|
||||||
$vCard = Horde_iCalendar::newComponent('vcard', $container);
|
|
||||||
|
|
||||||
if (!$vCard->parsevCalendar($_vcard, 'VCARD', $charset))
|
|
||||||
{
|
{
|
||||||
return False;
|
$container = false;
|
||||||
|
$vCard = Horde_iCalendar::newComponent('vcard', $container);
|
||||||
|
|
||||||
|
if (!$vCard->parsevCalendar($_vcard, 'VCARD', $charset))
|
||||||
|
{
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$vCard = $_vcard;
|
||||||
}
|
}
|
||||||
$vcardValues = $vCard->getAllAttributes();
|
$vcardValues = $vCard->getAllAttributes();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user