diff options
| author | Frédéric Guillot <contact@fredericguillot.com> | 2014-03-05 22:27:48 -0500 |
|---|---|---|
| committer | Frédéric Guillot <contact@fredericguillot.com> | 2014-03-05 22:27:48 -0500 |
| commit | 544f9924241f9b2caaf83ead203161ea41e5f1cf (patch) | |
| tree | dcb5ba8a202fee673e395184795f570fd7c905ae /models/comment.php | |
| parent | 1e994f34486da72662ff39f1c3e130e4480e30ab (diff) | |
Add a 'due date' field and display the number of comments on the board
Diffstat (limited to 'models/comment.php')
| -rw-r--r-- | models/comment.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/models/comment.php b/models/comment.php index e0944249..9e5cf8fd 100644 --- a/models/comment.php +++ b/models/comment.php @@ -25,6 +25,14 @@ class Comment extends Base ->findAll(); } + public function count($task_id) + { + return $this->db + ->table(self::TABLE) + ->eq(self::TABLE.'.task_id', $task_id) + ->count(); + } + public function create(array $values) { $values['date'] = time(); |
