summaryrefslogtreecommitdiff
path: root/app/Model/Board.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-10-05 19:40:57 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-10-05 19:40:57 -0400
commitd138834dcf902534f78237939926e97fd9a0eebe (patch)
treea6247b9ed98079899c9e21d43044030b69088bee /app/Model/Board.php
parent7f5a871f84639a90eebd0ac1d0ee7f759e220cf6 (diff)
Regular users are able to create private projects
Diffstat (limited to 'app/Model/Board.php')
-rw-r--r--app/Model/Board.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/Model/Board.php b/app/Model/Board.php
index ac9cbdf9..728d9d29 100644
--- a/app/Model/Board.php
+++ b/app/Model/Board.php
@@ -32,6 +32,29 @@ class Board extends Base
}
/**
+ * Get user default columns
+ *
+ * @access public
+ * @return array
+ */
+ public function getUserColumns()
+ {
+ $column_names = explode(',', $this->config->get('board_columns', implode(',', $this->getDefaultColumns())));
+ $columns = array();
+
+ foreach ($column_names as $column_name) {
+
+ $column_name = trim($column_name);
+
+ if (! empty($column_name)) {
+ $columns[] = array('title' => $column_name, 'task_limit' => 0);
+ }
+ }
+
+ return $columns;
+ }
+
+ /**
* Create a board with default columns, must be executed inside a transaction
*
* @access public