From 1c1ed52867123f682c17265ae62958c7d908d325 Mon Sep 17 00:00:00 2001
From: Georg Ehrke <dev@georgswebsite.de>
Date: Tue, 29 May 2012 13:12:37 +0200
Subject: [PATCH] fix status of timezone detection

---
 apps/calendar/ajax/settings/timezonedetection.php | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/apps/calendar/ajax/settings/timezonedetection.php b/apps/calendar/ajax/settings/timezonedetection.php
index ba5f2af5fd..5f03f647b3 100644
--- a/apps/calendar/ajax/settings/timezonedetection.php
+++ b/apps/calendar/ajax/settings/timezonedetection.php
@@ -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
-- 
GitLab