aboutsummaryrefslogtreecommitdiffstats
path: root/apps/tasks/ajax
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-05-04 20:20:37 +0200
committerBart Visscher <bartv@thisnet.nl>2012-05-04 20:20:37 +0200
commit19d2b94837f19539c994157150f3f231f840d3f1 (patch)
tree56c66a44417e86e79d25dc62196fcc6fb33f00a9 /apps/tasks/ajax
parenteae21f32699ed01dd632d28c4ca7ff497c713a1f (diff)
downloadnextcloud-server-19d2b94837f19539c994157150f3f231f840d3f1.tar.gz
nextcloud-server-19d2b94837f19539c994157150f3f231f840d3f1.zip
Tasks: More updates to public API
Diffstat (limited to 'apps/tasks/ajax')
-rw-r--r--apps/tasks/ajax/addtask.php2
-rw-r--r--apps/tasks/ajax/edittask.php2
-rw-r--r--apps/tasks/ajax/gettasks.php4
-rw-r--r--apps/tasks/ajax/update_property.php4
4 files changed, 6 insertions, 6 deletions
diff --git a/apps/tasks/ajax/addtask.php b/apps/tasks/ajax/addtask.php
index 03eee7c5d9b..891fbdb96df 100644
--- a/apps/tasks/ajax/addtask.php
+++ b/apps/tasks/ajax/addtask.php
@@ -20,7 +20,7 @@ $request['description'] = null;
$vcalendar = OC_Task_App::createVCalendarFromRequest($request);
$id = OC_Calendar_Object::add($cid, $vcalendar->serialize());
-$user_timezone = OC_Preferences::getValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+$user_timezone = OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
$task = OC_Task_App::arrayForJSON($id, $vcalendar->VTODO, $user_timezone);
OCP\JSON::success(array('task' => $task));
diff --git a/apps/tasks/ajax/edittask.php b/apps/tasks/ajax/edittask.php
index b50a6cee6a3..78d1f193938 100644
--- a/apps/tasks/ajax/edittask.php
+++ b/apps/tasks/ajax/edittask.php
@@ -25,7 +25,7 @@ $tmpl->assign('details', $vcalendar->VTODO);
$tmpl->assign('id', $id);
$page = $tmpl->fetchPage();
-$user_timezone = OC_Preferences::getValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+$user_timezone = OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
$task = OC_Task_App::arrayForJSON($id, $vcalendar->VTODO, $user_timezone);
OCP\JSON::success(array('data' => array( 'id' => $id, 'page' => $page, 'task' => $task )));
diff --git a/apps/tasks/ajax/gettasks.php b/apps/tasks/ajax/gettasks.php
index aaf80a66776..011730d0a13 100644
--- a/apps/tasks/ajax/gettasks.php
+++ b/apps/tasks/ajax/gettasks.php
@@ -11,7 +11,7 @@ OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('tasks');
$calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true);
-$user_timezone = OC_Preferences::getValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+$user_timezone = OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
$tasks = array();
foreach( $calendars as $calendar ){
@@ -28,7 +28,7 @@ foreach( $calendars as $calendar ){
try {
$tasks[] = OC_Task_App::arrayForJSON($task['id'], $vtodo, $user_timezone);
} catch(Exception $e) {
- OC_Log::write('tasks', $e->getMessage(), OC_Log::ERROR);
+ OCP\Util::writeLog('tasks', $e->getMessage(), OCP\Util::ERROR);
}
}
}
diff --git a/apps/tasks/ajax/update_property.php b/apps/tasks/ajax/update_property.php
index 2067dd983ec..46521cf6c58 100644
--- a/apps/tasks/ajax/update_property.php
+++ b/apps/tasks/ajax/update_property.php
@@ -38,7 +38,7 @@ switch($property) {
$type = null;
if ($due != 'false') {
try {
- $timezone = OC_Preferences::getValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+ $timezone = OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
$timezone = new DateTimeZone($timezone);
$due = new DateTime('@'.$due);
$due->setTimezone($timezone);
@@ -63,6 +63,6 @@ switch($property) {
}
OC_Calendar_Object::edit($id, $vcalendar->serialize());
-$user_timezone = OC_Preferences::getValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+$user_timezone = OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
$task_info = OC_Task_App::arrayForJSON($id, $vtodo, $user_timezone);
OCP\JSON::success(array('data' => $task_info));