Make sure that files are removed when a task is deleted

This commit is contained in:
Frédéric Guillot
2014-05-25 18:27:18 -04:00
parent b6c4c93fe7
commit dbc4443bb1
2 changed files with 23 additions and 1 deletions

View File

@@ -441,6 +441,9 @@ class Task extends Base
*/
public function remove($task_id)
{
$file = new File($this->db, $this->event);
$file->removeAll($task_id);
return $this->db->table(self::TABLE)->eq('id', $task_id)->remove();
}