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