diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-03-19 16:45:32 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-03-19 16:45:32 -0400 |
commit | d915c2a96b0cbb54b9949cc04495d156e1f89332 (patch) | |
tree | 93f31d3de295c0f6cfc7c3a3bdf20cb8d7e7922a /app/Helper/SubtaskHelper.php | |
parent | 5b7ed28ba1a47a5c4312017a86fb811e14c0285a (diff) |
Improve subtask toggle
Diffstat (limited to 'app/Helper/SubtaskHelper.php')
-rw-r--r-- | app/Helper/SubtaskHelper.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/app/Helper/SubtaskHelper.php b/app/Helper/SubtaskHelper.php index eea1ed63..3a853238 100644 --- a/app/Helper/SubtaskHelper.php +++ b/app/Helper/SubtaskHelper.php @@ -45,20 +45,24 @@ class SubtaskHelper extends Base * Get the link to toggle subtask status * * @access public - * @param array $task - * @param array $subtask + * @param array $task + * @param array $subtask + * @param string $fragment + * @param int $userId * @return string */ - public function renderToggleStatus(array $task, array $subtask) + public function renderToggleStatus(array $task, array $subtask, $fragment = '', $userId = 0) { if (! $this->helper->user->hasProjectAccess('SubtaskController', 'edit', $task['project_id'])) { $html = $this->renderTitle($subtask); } else { $title = $this->renderTitle($subtask); $params = array( - 'project_id' => $task['project_id'], - 'task_id' => $subtask['task_id'], - 'subtask_id' => $subtask['id'], + 'project_id' => $task['project_id'], + 'task_id' => $subtask['task_id'], + 'subtask_id' => $subtask['id'], + 'user_id' => $userId, + 'fragment' => $fragment, ); if ($subtask['status'] == 0 && $this->hasSubtaskInProgress()) { |