diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-07-19 22:38:30 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-07-19 22:38:30 -0400 |
commit | 390082aa41cb81610089163b1cc3a256f3b3c513 (patch) | |
tree | 1ada3964702ee536fe1486f34230f8e30a95d82e /app/Action/CommentCreationMoveTaskColumn.php | |
parent | d9d37882228771bca0c7f53f5ffcef90ba7ac1c5 (diff) |
Refactoring of internal task events
Diffstat (limited to 'app/Action/CommentCreationMoveTaskColumn.php')
-rw-r--r-- | app/Action/CommentCreationMoveTaskColumn.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/Action/CommentCreationMoveTaskColumn.php b/app/Action/CommentCreationMoveTaskColumn.php index 1b16f481..8ab792ad 100644 --- a/app/Action/CommentCreationMoveTaskColumn.php +++ b/app/Action/CommentCreationMoveTaskColumn.php @@ -55,7 +55,13 @@ class CommentCreationMoveTaskColumn extends Base */ public function getEventRequiredParameters() { - return array('task_id', 'column_id'); + return array( + 'task_id', + 'task' => array( + 'column_id', + 'project_id', + ), + ); } /** @@ -71,7 +77,7 @@ class CommentCreationMoveTaskColumn extends Base return false; } - $column = $this->columnModel->getById($data['column_id']); + $column = $this->columnModel->getById($data['task']['column_id']); return (bool) $this->commentModel->create(array( 'comment' => t('Moved to column %s', $column['title']), @@ -89,6 +95,6 @@ class CommentCreationMoveTaskColumn extends Base */ public function hasRequiredCondition(array $data) { - return $data['column_id'] == $this->getParam('column_id'); + return $data['task']['column_id'] == $this->getParam('column_id'); } } |