diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-09-20 14:49:31 +0200 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-09-20 14:49:31 +0200 |
commit | 41e796c52aa693d13636b54efe15705eaec27f3f (patch) | |
tree | bc670e457e98c1d8a9ac8e2b82bf8e2c424af328 /app/Model/SubTask.php | |
parent | 00cdc609d113fedf977da1d55136dc4d699fb308 (diff) |
Models refactoring/improvements
Diffstat (limited to 'app/Model/SubTask.php')
-rw-r--r-- | app/Model/SubTask.php | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/app/Model/SubTask.php b/app/Model/SubTask.php index 400c79f4..0126030a 100644 --- a/app/Model/SubTask.php +++ b/app/Model/SubTask.php @@ -128,17 +128,8 @@ class SubTask extends Base */ public function prepare(array &$values) { - if (isset($values['another_subtask'])) { - unset($values['another_subtask']); - } - - if (isset($values['time_estimated']) && empty($values['time_estimated'])) { - $values['time_estimated'] = 0; - } - - if (isset($values['time_spent']) && empty($values['time_spent'])) { - $values['time_spent'] = 0; - } + $this->removeFields($values, array('another_subtask')); + $this->resetFields($values, array('time_estimated', 'time_spent')); } /** |