summaryrefslogtreecommitdiffstats
path: root/apps/tasks/ajax/update_property.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/update_property.php
parent1e471562268ff62c59708b724c22930bc1d01d95 (diff)
downloadnextcloud-server-439467746a64ae3efbe85c08f29e14c823e4a0dc.tar.gz
nextcloud-server-439467746a64ae3efbe85c08f29e14c823e4a0dc.zip
Tasks: Update to new public API
Diffstat (limited to 'apps/tasks/ajax/update_property.php')
-rw-r--r--apps/tasks/ajax/update_property.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/tasks/ajax/update_property.php b/apps/tasks/ajax/update_property.php
index b075489bd17..68fe32637cf 100644
--- a/apps/tasks/ajax/update_property.php
+++ b/apps/tasks/ajax/update_property.php
@@ -8,8 +8,8 @@
// Init owncloud
require_once('../../../lib/base.php');
-OC_JSON::checkLoggedIn();
-OC_JSON::checkAppEnabled('tasks');
+OCP\JSON::checkLoggedIn();
+OCP\JSON::checkAppEnabled('tasks');
$id = $_POST['id'];
$property = $_POST['type'];
@@ -39,7 +39,7 @@ switch($property) {
$type = null;
if ($due != 'false') {
try {
- $timezone = OC_Preferences::getValue(OC_User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+ $timezone = OC_Preferences::getValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get());
$timezone = new DateTimeZone($timezone);
$due = new DateTime('@'.$due);
$due->setTimezone($timezone);
@@ -48,7 +48,7 @@ switch($property) {
$type = Sabre_VObject_Element_DateTime::DATE;
}
} catch (Exception $e) {
- OC_JSON::error(array('data'=>array('message'=>OC_Task_App::$l10n->t('Invalid date/time'))));
+ OCP\JSON::error(array('data'=>array('message'=>OC_Task_App::$l10n->t('Invalid date/time'))));
exit();
}
}
@@ -59,11 +59,11 @@ switch($property) {
OC_Task_App::setComplete($vtodo, $checked ? '100' : '0', null);
break;
default:
- OC_JSON::error(array('data'=>array('message'=>'Unknown type')));
+ OCP\JSON::error(array('data'=>array('message'=>'Unknown type')));
exit();
}
OC_Calendar_Object::edit($id, $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_info = OC_Task_App::arrayForJSON($id, $vtodo, $user_timezone);
-OC_JSON::success(array('data' => $task_info));
+OCP\JSON::success(array('data' => $task_info));