parent
d1f0261b5d
commit
1c1ed52867
|
@ -8,13 +8,9 @@
|
||||||
|
|
||||||
OCP\JSON::checkLoggedIn();
|
OCP\JSON::checkLoggedIn();
|
||||||
OCP\JSON::checkAppEnabled('calendar');
|
OCP\JSON::checkAppEnabled('calendar');
|
||||||
if(array_key_exists('timezonedetection', $_POST)){
|
if(array_key_exists('timezonedetection', $_POST) && $_POST['timezonedetection'] == 'on'){
|
||||||
if($_POST['timezonedetection'] == 'on'){
|
|
||||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'true');
|
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'true');
|
||||||
}else{
|
}else{
|
||||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'false');
|
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'false');
|
||||||
}
|
}
|
||||||
OCP\JSON::success();
|
OCP\JSON::success();
|
||||||
}else{
|
|
||||||
OCP\JSON::error();
|
|
||||||
}
|
|
Loading…
Reference in New Issue