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

@@ -37,7 +37,7 @@ class SubtaskController extends BaseController
'task' => $task,
)));
}
/**
* Prepare form values
*
@@ -86,7 +86,7 @@ class SubtaskController extends BaseController
if (! $this->subtaskModel->create($subtaskValues)) {
$this->flash->failure(t('Unable to create your sub-task.'));
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']), 'subtasks'), true);
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id']), 'subtasks'), true);
return false;
}
@@ -110,7 +110,7 @@ class SubtaskController extends BaseController
}
}
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']), 'subtasks'), true);
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id']), 'subtasks'), true);
}
/**
@@ -160,7 +160,7 @@ class SubtaskController extends BaseController
$this->flash->failure(t('Unable to update your sub-task.'));
}
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true);
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'])), true);
}
return $this->edit($values, $errors);
@@ -199,7 +199,7 @@ class SubtaskController extends BaseController
$this->flash->failure(t('Unable to remove this sub-task.'));
}
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true);
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'])), true);
}
/**