summaryrefslogtreecommitdiff
path: root/app/Controller/Category.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-07-12 10:38:42 -0400
committerFrederic Guillot <fred@kanboard.net>2015-07-12 10:38:42 -0400
commitbc98748c0d5b1e1c4d08f16b58db8aea9b5fb5ce (patch)
treeb8eca28ff1546fe21f5d0ebb48f93e4b5988d92b /app/Controller/Category.php
parent7e94d0ca233d15d6124c0adf3f956a119c82ccae (diff)
Start to implement url rewrite (nice urls)
Diffstat (limited to 'app/Controller/Category.php')
-rw-r--r--app/Controller/Category.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Controller/Category.php b/app/Controller/Category.php
index 515cc9c8..e8d83f2d 100644
--- a/app/Controller/Category.php
+++ b/app/Controller/Category.php
@@ -23,7 +23,7 @@ class Category extends Base
if (empty($category)) {
$this->session->flashError(t('Category not found.'));
- $this->response->redirect('?controller=category&action=index&project_id='.$project_id);
+ $this->response->redirect($this->helper->url->to('category', 'index', array('project_id' => $project_id)));
}
return $category;
@@ -63,7 +63,7 @@ class Category extends Base
if ($this->category->create($values)) {
$this->session->flash(t('Your category have been created successfully.'));
- $this->response->redirect('?controller=category&action=index&project_id='.$project['id']);
+ $this->response->redirect($this->helper->url->to('category', 'index', array('project_id' => $project['id'])));
}
else {
$this->session->flashError(t('Unable to create your category.'));
@@ -107,7 +107,7 @@ class Category extends Base
if ($this->category->update($values)) {
$this->session->flash(t('Your category have been updated successfully.'));
- $this->response->redirect('?controller=category&action=index&project_id='.$project['id']);
+ $this->response->redirect($this->helper->url->to('category', 'index', array('project_id' => $project['id'])));
}
else {
$this->session->flashError(t('Unable to update your category.'));
@@ -151,6 +151,6 @@ class Category extends Base
$this->session->flashError(t('Unable to remove this category.'));
}
- $this->response->redirect('?controller=category&action=index&project_id='.$project['id']);
+ $this->response->redirect($this->helper->url->to('category', 'index', array('project_id' => $project['id'])));
}
}