diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-22 19:15:50 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-22 19:15:50 -0500 |
commit | 4d007ec39fe808c28fe08516afe549aa5d0aeb42 (patch) | |
tree | 615ef57a18e675afead27046b90fe800a9f63109 /app | |
parent | c49d46718a07afeea017aa90a60320587211dc49 (diff) |
addColumn() return the column_id now
Diffstat (limited to 'app')
-rw-r--r-- | app/Model/Board.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/Model/Board.php b/app/Model/Board.php index 4c78b0f6..667bbdbe 100644 --- a/app/Model/Board.php +++ b/app/Model/Board.php @@ -109,16 +109,18 @@ class Board extends Base * @param integer $project_id Project id * @param string $title Column title * @param integer $task_limit Task limit - * @return boolean + * @return boolean|integer */ public function addColumn($project_id, $title, $task_limit = 0) { - return $this->db->table(self::TABLE)->save(array( + $values = array( 'project_id' => $project_id, 'title' => $title, 'task_limit' => $task_limit, 'position' => $this->getLastColumnPosition($project_id) + 1, - )); + ); + + return $this->persist(self::TABLE, $values); } /** |