@ -9,6 +9,8 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
OCP\JSON::callCheck();
$calendarid = $_POST['calendarid'];
$calendar = OC_Calendar_App::getCalendar($calendarid, true);
if(!$calendar){
@ -9,6 +9,7 @@
$cal = $_POST["calendarid"];
$calendar = OC_Calendar_App::getCalendar($cal, true);
@ -6,11 +6,10 @@
* See the COPYING-README file.
*/
// Check if we are a user
if(trim($_POST['name']) == ''){
OCP\JSON::error(array('message'=>'empty'));
@ -11,6 +11,7 @@
foreach ($_POST as $key=>$element) {
debug('_POST: '.$key.'=>'.print_r($element, true));
$id = $_POST['id'];
$access = OC_Calendar_App::getaccess($id, OC_Calendar_App::EVENT);
@ -7,6 +7,7 @@
@ -10,6 +10,7 @@
$errarr = OC_Calendar_Object::validateRequest($_POST);
if($errarr){
@ -10,6 +10,7 @@ ob_start();
OCP\App::checkAppEnabled('calendar');
session_write_close();
$nl="\r\n";
if(isset($_POST["firstday"])){
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'firstday', $_POST["firstday"]);
OCP\JSON::success();
if(isset($_POST["timeformat"])){
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timeformat', $_POST["timeformat"]);
@ -14,6 +14,7 @@ $l=OC_L10N::get('calendar');
// Get data
if( isset( $_POST['timezone'] ) ){