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