diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-07-12 10:38:42 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-07-12 10:38:42 -0400 |
commit | bc98748c0d5b1e1c4d08f16b58db8aea9b5fb5ce (patch) | |
tree | b8eca28ff1546fe21f5d0ebb48f93e4b5988d92b /app/Controller/Swimlane.php | |
parent | 7e94d0ca233d15d6124c0adf3f956a119c82ccae (diff) |
Start to implement url rewrite (nice urls)
Diffstat (limited to 'app/Controller/Swimlane.php')
-rw-r--r-- | app/Controller/Swimlane.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/app/Controller/Swimlane.php b/app/Controller/Swimlane.php index c6862d47..054fa4ba 100644 --- a/app/Controller/Swimlane.php +++ b/app/Controller/Swimlane.php @@ -25,7 +25,7 @@ class Swimlane extends Base if (empty($swimlane)) { $this->session->flashError(t('Swimlane not found.')); - $this->response->redirect('?controller=swimlane&action=index&project_id='.$project_id); + $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project_id))); } return $swimlane; @@ -67,7 +67,7 @@ class Swimlane extends Base if ($this->swimlane->create($project['id'], $values['name'])) { $this->session->flash(t('Your swimlane have been created successfully.')); - $this->response->redirect('?controller=swimlane&action=index&project_id='.$project['id']); + $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id']))); } else { $this->session->flashError(t('Unable to create your swimlane.')); @@ -93,7 +93,7 @@ class Swimlane extends Base if ($this->swimlane->updateDefault($values)) { $this->session->flash(t('The default swimlane have been updated successfully.')); - $this->response->redirect('?controller=swimlane&action=index&project_id='.$project['id']); + $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id']))); } else { $this->session->flashError(t('Unable to update this swimlane.')); @@ -137,7 +137,7 @@ class Swimlane extends Base if ($this->swimlane->rename($values['id'], $values['name'])) { $this->session->flash(t('Swimlane updated successfully.')); - $this->response->redirect('?controller=swimlane&action=index&project_id='.$project['id']); + $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id']))); } else { $this->session->flashError(t('Unable to update this swimlane.')); @@ -181,7 +181,7 @@ class Swimlane extends Base $this->session->flashError(t('Unable to remove this swimlane.')); } - $this->response->redirect('?controller=swimlane&action=index&project_id='.$project['id']); + $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id']))); } /** @@ -201,7 +201,7 @@ class Swimlane extends Base $this->session->flashError(t('Unable to update this swimlane.')); } - $this->response->redirect('?controller=swimlane&action=index&project_id='.$project['id']); + $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id']))); } /** @@ -221,7 +221,7 @@ class Swimlane extends Base $this->session->flashError(t('Unable to update this swimlane.')); } - $this->response->redirect('?controller=swimlane&action=index&project_id='.$project['id']); + $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id']))); } /** @@ -236,7 +236,7 @@ class Swimlane extends Base $swimlane_id = $this->request->getIntegerParam('swimlane_id'); $this->swimlane->moveUp($project['id'], $swimlane_id); - $this->response->redirect('?controller=swimlane&action=index&project_id='.$project['id']); + $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id']))); } /** @@ -251,6 +251,6 @@ class Swimlane extends Base $swimlane_id = $this->request->getIntegerParam('swimlane_id'); $this->swimlane->moveDown($project['id'], $swimlane_id); - $this->response->redirect('?controller=swimlane&action=index&project_id='.$project['id']); + $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id']))); } } |