Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/calendar/ajax/editeventform.php')
-rw-r--r--apps/calendar/ajax/editeventform.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/calendar/ajax/editeventform.php b/apps/calendar/ajax/editeventform.php
index 66b0b23568a..e2d32d03d3d 100644
--- a/apps/calendar/ajax/editeventform.php
+++ b/apps/calendar/ajax/editeventform.php
@@ -28,7 +28,7 @@ if($calendar['userid'] != OC_User::getUser()){
$object = Sabre_VObject_Reader::read($data['calendardata']);
$vevent = $object->VEVENT;
$dtstart = $vevent->DTSTART;
-$dtend = $vevent->DTEND;
+$dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
switch($dtstart->getDateType()) {
case Sabre_VObject_Element_DateTime::LOCALTZ:
case Sabre_VObject_Element_DateTime::LOCAL:
@@ -55,6 +55,11 @@ if (isset($vevent->CATEGORIES)){
$categories = explode(',', $vevent->CATEGORIES->value);
$categories = array_map('trim', $categories);
}
+foreach($categories as $category){
+ if (!in_array($category, $category_options)){
+ array_unshift($category_options, $category);
+ }
+}
$repeat = isset($vevent->CATEGORY) ? $vevent->CATEGORY->value : '';
$description = isset($vevent->DESCRIPTION) ? $vevent->DESCRIPTION->value : '';