diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-02-23 22:12:00 +0100 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-02-23 22:12:00 +0100 |
commit | eae32e05c9feb742b51bd70c7f3fa2270191f719 (patch) | |
tree | 5ed88abfdf439b59809dea7ed4277bc55c0d7b26 /apps/calendar/ajax/event/new.php | |
parent | 95fe15991429f915dbb66be53562f9f540a8b1be (diff) | |
parent | b1fb325d4815b4f4537f6a0dbe4a1eb4f5b3c360 (diff) | |
download | nextcloud-server-eae32e05c9feb742b51bd70c7f3fa2270191f719.tar.gz nextcloud-server-eae32e05c9feb742b51bd70c7f3fa2270191f719.zip |
Merge branch 'master' into sabredav_1.6
Diffstat (limited to 'apps/calendar/ajax/event/new.php')
-rw-r--r-- | apps/calendar/ajax/event/new.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/apps/calendar/ajax/event/new.php b/apps/calendar/ajax/event/new.php new file mode 100644 index 00000000000..59fda79da73 --- /dev/null +++ b/apps/calendar/ajax/event/new.php @@ -0,0 +1,27 @@ +<?php +/** + * Copyright (c) 2011 Georg Ehrke <ownclouddev at georgswebsite dot de> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +require_once('../../../../lib/base.php'); + +$l10n = new OC_L10N('calendar'); + +OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('calendar'); + +$errarr = OC_Calendar_Object::validateRequest($_POST); +if($errarr){ + //show validate errors + OC_JSON::error($errarr); + exit; +}else{ + $cal = $_POST['calendar']; + $vcalendar = OC_Calendar_Object::createVCalendarFromRequest($_POST); + $result = OC_Calendar_Object::add($cal, $vcalendar->serialize()); + OC_JSON::success(); +} +?> |