]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix status
authorGeorg Ehrke <dev@georgswebsite.de>
Tue, 29 May 2012 11:12:37 +0000 (13:12 +0200)
committerGeorg Ehrke <dev@georgswebsite.de>
Tue, 29 May 2012 11:14:05 +0000 (13:14 +0200)
of timezone detection

apps/calendar/ajax/settings/timezonedetection.php

index ba5f2af5fd98d1aabb52c1f8934103c88dd7f09a..5f03f647b3ab5b6d47b09a85be30100f9bf8c02e 100644 (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();
-}
\ No newline at end of file
+       OCP\Config::setUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection', 'false');
+}
+OCP\JSON::success();
\ No newline at end of file