summaryrefslogtreecommitdiffstats
path: root/apps/tasks/ajax/addtask.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-05-04 17:19:25 +0200
committerBart Visscher <bartv@thisnet.nl>2012-05-04 17:19:25 +0200
commit439467746a64ae3efbe85c08f29e14c823e4a0dc (patch)
treea094f5483e9792e9c8c129bf21be8f9e54067e92 /apps/tasks/ajax/addtask.php
parent1e471562268ff62c59708b724c22930bc1d01d95 (diff)
downloadnextcloud-server-439467746a64ae3efbe85c08f29e14c823e4a0dc.tar.gz
nextcloud-server-439467746a64ae3efbe85c08f29e14c823e4a0dc.zip
Tasks: Update to new public API
Diffstat (limited to 'apps/tasks/ajax/addtask.php')
-rw-r--r--apps/tasks/ajax/addtask.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/tasks/ajax/addtask.php b/apps/tasks/ajax/addtask.php
index 9d62a5fe707..9f5f382cacf 100644
--- a/apps/tasks/ajax/addtask.php
+++ b/apps/tasks/ajax/addtask.php
@@ -2,10 +2,10 @@
// Init owncloud
require_once('../../../lib/base.php');
-OC_JSON::checkLoggedIn();
-OC_JSON::checkAppEnabled('tasks');
+OCP\JSON::checkLoggedIn();
+OCP\JSON::checkAppEnabled('tasks');
-$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser(), true);
+$calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true);
$cid = reset($calendars)['id'];
$input = $_GET['text'];
@@ -21,7 +21,7 @@ $request['description'] = null;
$vcalendar = OC_Task_App::createVCalendarFromRequest($request);
$id = OC_Calendar_Object::add($cid, $vcalendar->serialize());
-$user_timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+$user_timezone = OC_Preferences::getValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
$task = OC_Task_App::arrayForJSON($id, $vcalendar->VTODO, $user_timezone);
-OC_JSON::success(array('task' => $task));
+OCP\JSON::success(array('task' => $task));