2011-08-31 15:29:38 +00:00
|
|
|
<?php
|
2011-09-23 20:59:24 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2011 Bart Visscher <bartv@thisnet.nl>
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
|
2011-08-31 15:29:38 +00:00
|
|
|
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-08-31 15:29:38 +00:00
|
|
|
$calendarid = $_POST['calendarid'];
|
2011-12-18 21:58:20 +00:00
|
|
|
$calendar = OC_Calendar_App::getCalendar($calendarid);//access check
|
2011-08-31 15:29:38 +00:00
|
|
|
OC_Calendar_Calendar::setCalendarActive($calendarid, $_POST['active']);
|
2011-12-18 21:58:20 +00:00
|
|
|
$calendar = OC_Calendar_App::getCalendar($calendarid);
|
2011-10-19 17:07:56 +00:00
|
|
|
OC_JSON::success(array(
|
|
|
|
'active' => $calendar['active'],
|
|
|
|
'eventSource' => OC_Calendar_Calendar::getEventSourceInfo($calendar),
|
|
|
|
));
|