Rewrite of session management

This commit is contained in:
Frederic Guillot
2015-11-15 12:50:33 -05:00
parent 2fc402f673
commit a675271ad7
72 changed files with 793 additions and 466 deletions

View File

@@ -82,9 +82,9 @@ class Comment extends Base
if ($valid) {
if ($this->comment->create($values)) {
$this->session->flash(t('Comment added successfully.'));
$this->flash->success(t('Comment added successfully.'));
} else {
$this->session->flashError(t('Unable to create your comment.'));
$this->flash->failure(t('Unable to create your comment.'));
}
if ($ajax) {
@@ -131,9 +131,9 @@ class Comment extends Base
if ($valid) {
if ($this->comment->update($values)) {
$this->session->flash(t('Comment updated successfully.'));
$this->flash->success(t('Comment updated successfully.'));
} else {
$this->session->flashError(t('Unable to update your comment.'));
$this->flash->failure(t('Unable to update your comment.'));
}
$this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comment-'.$comment['id']));
@@ -171,9 +171,9 @@ class Comment extends Base
$comment = $this->getComment();
if ($this->comment->remove($comment['id'])) {
$this->session->flash(t('Comment removed successfully.'));
$this->flash->success(t('Comment removed successfully.'));
} else {
$this->session->flashError(t('Unable to remove this comment.'));
$this->flash->failure(t('Unable to remove this comment.'));
}
$this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments'));