diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-05-04 17:19:25 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-05-04 17:19:25 +0200 |
commit | 439467746a64ae3efbe85c08f29e14c823e4a0dc (patch) | |
tree | a094f5483e9792e9c8c129bf21be8f9e54067e92 /apps/tasks/ajax/addtask.php | |
parent | 1e471562268ff62c59708b724c22930bc1d01d95 (diff) | |
download | nextcloud-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.php | 10 |
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)); |