2011-09-24 17:52:55 +00:00
|
|
|
<?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');
|
|
|
|
|
2011-12-22 15:31:01 +00:00
|
|
|
OC_JSON::checkLoggedIn();
|
2011-09-30 21:05:10 +00:00
|
|
|
OC_JSON::checkAppEnabled('calendar');
|
2011-09-24 17:52:55 +00:00
|
|
|
|
|
|
|
$cal = $_POST["calendarid"];
|
2011-12-18 21:58:20 +00:00
|
|
|
$calendar = OC_Calendar_App::getCalendar($cal);
|
2011-09-24 17:52:55 +00:00
|
|
|
$del = OC_Calendar_Calendar::deleteCalendar($cal);
|
|
|
|
if($del == true){
|
2011-09-23 20:22:59 +00:00
|
|
|
OC_JSON::success();
|
2011-09-24 17:52:55 +00:00
|
|
|
}else{
|
2011-09-23 20:22:59 +00:00
|
|
|
OC_JSON::error(array('error'=>'dberror'));
|
2011-09-24 17:52:55 +00:00
|
|
|
}
|
|
|
|
?>
|