From 7a442c5359eb158c9ecef87ded52ee65d4113f38 Mon Sep 17 00:00:00 2001 From: maxpozdeev Date: Fri, 9 Sep 2022 19:41:53 +0300 Subject: [PATCH] fix for bb23883: task was created twice if full form was used --- src/includes/api/TasksController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/includes/api/TasksController.php b/src/includes/api/TasksController.php index 8ba4024..145f103 100644 --- a/src/includes/api/TasksController.php +++ b/src/includes/api/TasksController.php @@ -121,7 +121,10 @@ class TasksController extends ApiController { if ($action == 'full') { $this->response->data = $this->fullNewTaskInList($listId); } - $this->response->data = $this->newTaskInList($listId); + else { + $this->response->data = $this->newTaskInList($listId); + } + } /** @@ -477,7 +480,7 @@ class TasksController extends ApiController { 'ow' => (int)$r['ow'], 'tags' => htmlarray($r['tags']), 'tags_ids' => htmlarray($r['tags_ids']), - 'duedate' => $dueA['formatted'], + 'duedate' => htmlarray($dueA['formatted']), 'dueClass' => $dueA['class'], 'dueStr' => htmlarray($dueA['str']), 'dueInt' => $this->date2int($r['duedate']),