summaryrefslogtreecommitdiffstats
path: root/apps/calendar/ajax/import/dropimport.php
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-06-30 22:26:29 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-06-30 22:26:29 +0200
commitf15941a967669c9a7e1e1c391b55e61a39e44484 (patch)
treed0fb8214999d48ae4a68e3bcef9e4d0bbe21e327 /apps/calendar/ajax/import/dropimport.php
parent4890bbb30d68d9b8afbadbe1b263035ecb9df676 (diff)
downloadnextcloud-server-f15941a967669c9a7e1e1c391b55e61a39e44484.tar.gz
nextcloud-server-f15941a967669c9a7e1e1c391b55e61a39e44484.zip
improve dropimport
Diffstat (limited to 'apps/calendar/ajax/import/dropimport.php')
-rw-r--r--apps/calendar/ajax/import/dropimport.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/calendar/ajax/import/dropimport.php b/apps/calendar/ajax/import/dropimport.php
index 25b404787f2..a3bef1ac294 100644
--- a/apps/calendar/ajax/import/dropimport.php
+++ b/apps/calendar/ajax/import/dropimport.php
@@ -19,7 +19,8 @@ if(!$import->isValid()){
OCP\JSON::error();
exit;
}
-$newid = OC_Calendar_Calendar::addCalendar(OCP\User::getUser(),strip_tags($import->createCalendarName()),'VEVENT,VTODO,VJOURNAL',null,0,$import->createCalendarColor());
+$newcalendarname = strip_tags($import->createCalendarName());
+$newid = OC_Calendar_Calendar::addCalendar(OCP\User::getUser(),$newcalendarname,'VEVENT,VTODO,VJOURNAL',null,0,$import->createCalendarColor());
$import->setCalendarID($newid);
$import->import();
-OCP\JSON::success(); \ No newline at end of file
+OCP\JSON::success(array('newcalendarname'=>$newcalendarname, 'count'=>$import->getCount(), 'newcalendarid'=>$newid, 'eventSource'=>OC_Calendar_Calendar::getEventSourceInfo(OC_Calendar_Calendar::find($newid)))); \ No newline at end of file