diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-04-14 14:55:37 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-04-14 14:55:37 +0200 |
commit | 029e1aced7fc39fa5673b69927a24aa18b159a19 (patch) | |
tree | 73a5643a52991c502ae2a945692a7822b2eba1d2 /apps/tasks/ajax | |
parent | 7d1880078c36eb51f7cd591b113a951064df4a65 (diff) | |
download | nextcloud-server-029e1aced7fc39fa5673b69927a24aa18b159a19.tar.gz nextcloud-server-029e1aced7fc39fa5673b69927a24aa18b159a19.zip |
Tasks: Update to use new categories interface
Diffstat (limited to 'apps/tasks/ajax')
-rw-r--r-- | apps/tasks/ajax/addtaskform.php | 4 | ||||
-rw-r--r-- | apps/tasks/ajax/edittaskform.php | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/apps/tasks/ajax/addtaskform.php b/apps/tasks/ajax/addtaskform.php index d4a0bb03107..f56549cd747 100644 --- a/apps/tasks/ajax/addtaskform.php +++ b/apps/tasks/ajax/addtaskform.php @@ -8,7 +8,7 @@ OC_JSON::checkAppEnabled('tasks'); $l10n = new OC_L10N('tasks'); $calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser(), true); -$category_options = OC_Calendar_Object::getCategoryOptions($l10n); +$category_options = OC_Calendar_App::getCategoryOptions($l10n); $percent_options = range(0, 100, 10); $priority_options = OC_Task_App::getPriorityOptions(); $tmpl = new OC_Template('tasks','part.addtaskform'); @@ -17,7 +17,7 @@ $tmpl->assign('category_options', $category_options); $tmpl->assign('percent_options', $percent_options); $tmpl->assign('priority_options', $priority_options); $tmpl->assign('details', new OC_VObject('VTODO')); -$tmpl->assign('categories', array()); +$tmpl->assign('categories', ''); $page = $tmpl->fetchPage(); OC_JSON::success(array('data' => array( 'page' => $page ))); diff --git a/apps/tasks/ajax/edittaskform.php b/apps/tasks/ajax/edittaskform.php index 651c26c4986..e23eb218244 100644 --- a/apps/tasks/ajax/edittaskform.php +++ b/apps/tasks/ajax/edittaskform.php @@ -9,13 +9,9 @@ $l10n = new OC_L10N('tasks'); $id = $_GET['id']; $details = OC_Calendar_App::getVCalendar($id)->VTODO; -$categories = array(); -if (isset($details->CATEGORIES)){ - $categories = explode(',', $details->CATEGORIES->value); - $categories = array_map('trim', $categories); -} +$categories = $details->getAsString('CATEGORIES'); -$category_options = OC_Calendar_Object::getCategoryOptions($l10n); +$category_options = OC_Calendar_App::getCategoryOptions($l10n); $percent_options = range(0, 100, 10); $priority_options = OC_Task_App::getPriorityOptions(); |