Welcome to mirror list, hosted at ThFree Co, Russian Federation.

timezonedetection.php « settings « ajax « calendar « apps - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 17bd740beea616e8e89e5559c0b2947ba200f90a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
 * Copyright (c) 2011, 2012 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.
 */
 
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
if(array_key_exists('timezonedetection', $_POST)){
	if($_POST['timezonedetection'] == 'on'){
		OC_Preferences::setValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'true');
	}else{
		OC_Preferences::setValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'false');
	}
	OC_JSON::success();
}else{
	OC_JSON::error();
}