fix status

of timezone detection
This commit is contained in:
Georg Ehrke 2012-05-29 13:12:37 +02:00
parent 22cd0f1cda
commit 75afc09b9d

View file

@ -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();