summaryrefslogtreecommitdiff
path: root/app/Model/TaskFinder.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-02-28 19:54:32 -0500
committerFrederic Guillot <fred@kanboard.net>2015-02-28 19:54:32 -0500
commitda425e4187e5e8e7feb9783c9d75bcaa9fa0c7ec (patch)
tree53b6d054a410c24078171ad7178a6c4ce505f434 /app/Model/TaskFinder.php
parentbb61b409a3577c99ca93c8b2b283437cf2a24040 (diff)
Rename subtasks and files tables
Diffstat (limited to 'app/Model/TaskFinder.php')
-rw-r--r--app/Model/TaskFinder.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php
index 98ece4e1..7216e92a 100644
--- a/app/Model/TaskFinder.php
+++ b/app/Model/TaskFinder.php
@@ -80,11 +80,11 @@ class TaskFinder extends Base
return $this->db
->table(Task::TABLE)
->columns(
- '(SELECT count(*) FROM comments WHERE task_id=tasks.id) AS nb_comments',
- '(SELECT count(*) FROM task_has_files WHERE task_id=tasks.id) AS nb_files',
- '(SELECT count(*) FROM task_has_subtasks WHERE task_id=tasks.id) AS nb_subtasks',
- '(SELECT count(*) FROM task_has_subtasks WHERE task_id=tasks.id AND status=2) AS nb_completed_subtasks',
- '(SELECT count(*) FROM ' . TaskLink::TABLE . ' WHERE ' . TaskLink::TABLE . '.task_id = tasks.id) AS nb_links',
+ '(SELECT count(*) FROM '.Comment::TABLE.' WHERE task_id=tasks.id) AS nb_comments',
+ '(SELECT count(*) FROM '.File::TABLE.' WHERE task_id=tasks.id) AS nb_files',
+ '(SELECT count(*) FROM '.Subtask::TABLE.' WHERE '.Subtask::TABLE.'.task_id=tasks.id) AS nb_subtasks',
+ '(SELECT count(*) FROM '.Subtask::TABLE.' WHERE '.Subtask::TABLE.'.task_id=tasks.id AND status=2) AS nb_completed_subtasks',
+ '(SELECT count(*) FROM '.TaskLink::TABLE.' WHERE '.TaskLink::TABLE.'.task_id = tasks.id) AS nb_links',
'tasks.id',
'tasks.reference',
'tasks.title',