summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/tasks/ajax/addtask.php2
-rw-r--r--apps/tasks/ajax/addtaskform.php4
-rw-r--r--apps/tasks/ajax/delete.php14
-rw-r--r--apps/tasks/ajax/edittaskform.php4
4 files changed, 3 insertions, 21 deletions
diff --git a/apps/tasks/ajax/addtask.php b/apps/tasks/ajax/addtask.php
index 0c8cb89e7fa..3f129a0eb90 100644
--- a/apps/tasks/ajax/addtask.php
+++ b/apps/tasks/ajax/addtask.php
@@ -5,8 +5,6 @@ require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('tasks');
-$l10n = new OC_L10N('tasks');
-
$cid = $_POST['id'];
$calendar = OC_Calendar_App::getCalendar( $cid );
diff --git a/apps/tasks/ajax/addtaskform.php b/apps/tasks/ajax/addtaskform.php
index f56549cd747..48e1bc8d897 100644
--- a/apps/tasks/ajax/addtaskform.php
+++ b/apps/tasks/ajax/addtaskform.php
@@ -5,10 +5,8 @@ require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('tasks');
-$l10n = new OC_L10N('tasks');
-
$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser(), true);
-$category_options = OC_Calendar_App::getCategoryOptions($l10n);
+$category_options = OC_Calendar_App::getCategoryOptions();
$percent_options = range(0, 100, 10);
$priority_options = OC_Task_App::getPriorityOptions();
$tmpl = new OC_Template('tasks','part.addtaskform');
diff --git a/apps/tasks/ajax/delete.php b/apps/tasks/ajax/delete.php
index 03c8a7e92e4..ce80191a560 100644
--- a/apps/tasks/ajax/delete.php
+++ b/apps/tasks/ajax/delete.php
@@ -25,20 +25,8 @@ require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('tasks');
-$l10n = new OC_L10N('tasks');
-
$id = $_GET['id'];
-$task = OC_Calendar_Object::find( $id );
-if( $task === false ){
- OC_JSON::error(array('data' => array( 'message' => $l10n->t('Can not find Task!'))));
- exit();
-}
-
-$calendar = OC_Calendar_Calendar::findCalendar( $task['calendarid'] );
-if( $calendar === false || $calendar['userid'] != OC_USER::getUser()){
- OC_JSON::error(array('data' => array( 'message' => $l10n->t('This is not your task!'))));
- exit();
-}
+$task = OC_Calendar_App::getEventObject( $id );
OC_Calendar_Object::delete($id);
OC_JSON::success(array('data' => array( 'id' => $id )));
diff --git a/apps/tasks/ajax/edittaskform.php b/apps/tasks/ajax/edittaskform.php
index e23eb218244..42a4bfead8d 100644
--- a/apps/tasks/ajax/edittaskform.php
+++ b/apps/tasks/ajax/edittaskform.php
@@ -5,13 +5,11 @@ require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('tasks');
-$l10n = new OC_L10N('tasks');
-
$id = $_GET['id'];
$details = OC_Calendar_App::getVCalendar($id)->VTODO;
$categories = $details->getAsString('CATEGORIES');
-$category_options = OC_Calendar_App::getCategoryOptions($l10n);
+$category_options = OC_Calendar_App::getCategoryOptions();
$percent_options = range(0, 100, 10);
$priority_options = OC_Task_App::getPriorityOptions();