summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/Board.php8
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);
}
/**