diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-08-21 20:36:16 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-08-21 20:36:16 -0400 |
commit | 1d16a53c480ea7eb93ba118f6ffd69131eb5f3c5 (patch) | |
tree | 822a3a22ce1411a1ad10665c6c7b8f3b6c2ed3b5 /app/Controller/TaskViewController.php | |
parent | 8e83e404fbb1d0dc770e5b41fa315a674541459a (diff) |
Store comment sorting direction in user metadata
Diffstat (limited to 'app/Controller/TaskViewController.php')
-rw-r--r-- | app/Controller/TaskViewController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Controller/TaskViewController.php b/app/Controller/TaskViewController.php index 36597457..31b9de11 100644 --- a/app/Controller/TaskViewController.php +++ b/app/Controller/TaskViewController.php @@ -4,6 +4,7 @@ namespace Kanboard\Controller; use Kanboard\Core\Controller\AccessForbiddenException; use Kanboard\Core\Controller\PageNotFoundException; +use Kanboard\Model\UserMetadataModel; /** * Task Controller @@ -61,13 +62,14 @@ class TaskViewController extends BaseController { $task = $this->getTask(); $subtasks = $this->subtaskModel->getAll($task['id']); + $commentSortingDirection = $this->userMetadataCacheDecorator->get(UserMetadataModel::KEY_COMMENT_SORTING_DIRECTION, 'ASC'); $this->response->html($this->helper->layout->task('task/show', array( 'task' => $task, 'project' => $this->projectModel->getById($task['project_id']), 'files' => $this->taskFileModel->getAllDocuments($task['id']), 'images' => $this->taskFileModel->getAllImages($task['id']), - 'comments' => $this->commentModel->getAll($task['id'], $this->userSession->getCommentSorting()), + 'comments' => $this->commentModel->getAll($task['id'], $commentSortingDirection), 'subtasks' => $subtasks, 'internal_links' => $this->taskLinkModel->getAllGroupedByLabel($task['id']), 'external_links' => $this->taskExternalLinkModel->getAll($task['id']), |