Start to implement url rewrite (nice urls)
This commit is contained in:
@@ -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'])));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user