diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-22 18:49:34 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-22 18:49:34 -0500 |
commit | c49d46718a07afeea017aa90a60320587211dc49 (patch) | |
tree | 68499594b8d2f6a26411249aaff12b87b4ee3628 /app/Model/Category.php | |
parent | 77e10d25829f3523a168bf61424fac99a539f8be (diff) |
Some refactoring for PHP 5.3
Diffstat (limited to 'app/Model/Category.php')
-rw-r--r-- | app/Model/Category.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/Model/Category.php b/app/Model/Category.php index 913c3e35..7fed50a3 100644 --- a/app/Model/Category.php +++ b/app/Model/Category.php @@ -98,14 +98,7 @@ class Category extends Base */ public function create(array $values) { - return $this->db->transaction(function($db) use ($values) { - - if (! $db->table(Category::TABLE)->save($values)) { - return false; - } - - return (int) $db->getConnection()->getLastId(); - }); + return $this->persist(self::TABLE, $values); } /** |