fix status

of timezone detection
This commit is contained in:
Georg Ehrke 2012-05-29 13:12:37 +02:00
parent d1f0261b5d
commit 1c1ed52867
1 changed files with 5 additions and 9 deletions

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