Remove project_id from task URLs

This commit is contained in:
Tomas Dittmann
2022-02-05 05:59:33 +01:00
committed by GitHub
parent 2150ca73b9
commit 61e63ef9e0
97 changed files with 209 additions and 219 deletions

View File

@@ -25,10 +25,10 @@ class TaskDuplicationController extends BaseController
if ($task_id > 0) {
$this->flash->success(t('Task created successfully.'));
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task_id)));
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task_id)));
} else {
$this->flash->failure(t('Unable to create this task.'));
return $this->response->redirect($this->helper->url->to('TaskDuplicationController', 'duplicate', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true);
return $this->response->redirect($this->helper->url->to('TaskDuplicationController', 'duplicate', array('task_id' => $task['id'])), true);
}
}
@@ -57,7 +57,7 @@ class TaskDuplicationController extends BaseController
$values['category_id'],
$values['owner_id'])) {
$this->flash->success(t('Task updated successfully.'));
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $values['project_id'], 'task_id' => $task['id'])));
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'])));
}
$this->flash->failure(t('Unable to update your task.'));