summaryrefslogtreecommitdiff
path: root/app/Controller/Comment.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/Comment.php
parent7e94d0ca233d15d6124c0adf3f956a119c82ccae (diff)
Start to implement url rewrite (nice urls)
Diffstat (limited to 'app/Controller/Comment.php')
-rw-r--r--app/Controller/Comment.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Controller/Comment.php b/app/Controller/Comment.php
index a5f6b1f8..ca701a88 100644
--- a/app/Controller/Comment.php
+++ b/app/Controller/Comment.php
@@ -90,10 +90,10 @@ class Comment extends Base
}
if ($ajax) {
- $this->response->redirect('?controller=board&action=show&project_id='.$task['project_id']);
+ $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $task['project_id'])));
}
- $this->response->redirect('?controller=task&action=show&task_id='.$task['id'].'&project_id='.$task['project_id'].'#comments');
+ $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), 'comments');
}
$this->create($values, $errors);
@@ -140,7 +140,7 @@ class Comment extends Base
$this->session->flashError(t('Unable to update your comment.'));
}
- $this->response->redirect('?controller=task&action=show&task_id='.$task['id'].'&project_id='.$task['project_id'].'#comment-'.$comment['id']);
+ $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), 'comment-'.$comment['id']);
}
$this->edit($values, $errors);
@@ -181,6 +181,6 @@ class Comment extends Base
$this->session->flashError(t('Unable to remove this comment.'));
}
- $this->response->redirect('?controller=task&action=show&task_id='.$task['id'].'&project_id='.$task['project_id'].'#comments');
+ $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), 'comments');
}
}