Skip to content
Snippets Groups Projects
Commit 94476234 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fix variable access and storing of removed property, fixes #4485

Closes #4485

Merge request studip/studip!3271
parent 8ae5076b
No related branches found
No related tags found
No related merge requests found
...@@ -815,7 +815,7 @@ class Calendar_CalendarController extends AuthenticatedController ...@@ -815,7 +815,7 @@ class Calendar_CalendarController extends AuthenticatedController
CSRFProtection::verifySecurityToken(); CSRFProtection::verifySecurityToken();
$range_id = Context::getId() ?? User::findCurrent()->id; $range_id = Context::getId() ?? User::findCurrent()->id;
$calendar_import = new ICalendarImport($range_id); $calendar_import = new ICalendarImport($range_id);
$calendar_import->convertPublicToPrivate(Request::bool('import_as_private_imp')); $calendar_import->convertPublicToPrivate(Request::bool('import_privat', false));
$calendar_import->import(file_get_contents($_FILES['importfile']['tmp_name'])); $calendar_import->import(file_get_contents($_FILES['importfile']['tmp_name']));
$import_count = $calendar_import->getCountEvents(); $import_count = $calendar_import->getCountEvents();
PageLayout::postSuccess(sprintf( PageLayout::postSuccess(sprintf(
......
...@@ -352,7 +352,6 @@ class ICalendarImport ...@@ -352,7 +352,6 @@ class ICalendarImport
$date->access = $properties['CLASS'] ?? 'PRIVATE'; $date->access = $properties['CLASS'] ?? 'PRIVATE';
$date->user_category = $properties['CATEGORIES']; $date->user_category = $properties['CATEGORIES'];
$date->category = $properties['STUDIP_CATEGORY'] ?: 1; $date->category = $properties['STUDIP_CATEGORY'] ?: 1;
$date->priority = $properties['PRIORITY'] ?? '';
$date->location = $properties['LOCATION']; $date->location = $properties['LOCATION'];
if (is_array($properties['EXDATE'])) { if (is_array($properties['EXDATE'])) {
foreach ($properties['EXDATE'] as $exdate) { foreach ($properties['EXDATE'] as $exdate) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment