forked from friendica/friendica-addons
Second part of refactoring; should be runnable again, yet not thoroughly tested
This commit is contained in:
parent
b8234a1cb8
commit
6186153f68
88 changed files with 2135 additions and 1186 deletions
|
@ -86,12 +86,12 @@ function wdcal_import_user_ics($calendar_id) {
|
|||
if ($_FILES["ics_file"]["tmp_name"] != "" && is_uploaded_file($_FILES["ics_file"]["tmp_name"])) try {
|
||||
$text = file_get_contents($_FILES["ics_file"]["tmp_name"]);
|
||||
|
||||
/** @var Sabre_VObject_Component_VCalendar $vObject */
|
||||
$vObject = Sabre_VObject_Reader::read($text);
|
||||
/** @var Sabre\VObject\Component\VCalendar $vObject */
|
||||
$vObject = Sabre\VObject\Reader::read($text);
|
||||
$comp = $vObject->getComponents();
|
||||
$imported = array();
|
||||
foreach ($comp as $c) try {
|
||||
/** @var Sabre_VObject_Component_VEvent $c */
|
||||
/** @var Sabre\VObject\Component\VEvent $c */
|
||||
$uid = $c->__get("UID")->value;
|
||||
if (!isset($imported[$uid])) $imported[$uid] = "";
|
||||
$imported[$uid] .= $c->serialize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue