fix status
of timezone detection
This commit is contained in:
parent
22cd0f1cda
commit
75afc09b9d
1 changed files with 5 additions and 9 deletions
|
@ -8,13 +8,9 @@
|
|||
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('calendar');
|
||||
if(array_key_exists('timezonedetection', $_POST)){
|
||||
if($_POST['timezonedetection'] == 'on'){
|
||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'true');
|
||||
}else{
|
||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'false');
|
||||
}
|
||||
OCP\JSON::success();
|
||||
if(array_key_exists('timezonedetection', $_POST) && $_POST['timezonedetection'] == 'on'){
|
||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'true');
|
||||
}else{
|
||||
OCP\JSON::error();
|
||||
}
|
||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'false');
|
||||
}
|
||||
OCP\JSON::success();
|
Loading…
Reference in a new issue