diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-02-18 09:42:01 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-02-18 09:42:01 -0500 |
commit | de128dbad860478496a0d655b5eb5c1005ebbabe (patch) | |
tree | 7fee510e901273472731e8e843981268c593ec40 /app/Api | |
parent | 0430a09c069134622c0161dc2fb9ba3718a73c0d (diff) |
Remove default swimlane
Diffstat (limited to 'app/Api')
-rw-r--r-- | app/Api/Procedure/SwimlaneProcedure.php | 11 | ||||
-rw-r--r-- | app/Api/Procedure/TaskProcedure.php | 4 |
2 files changed, 5 insertions, 10 deletions
diff --git a/app/Api/Procedure/SwimlaneProcedure.php b/app/Api/Procedure/SwimlaneProcedure.php index 9b7d181d..25b1efb0 100644 --- a/app/Api/Procedure/SwimlaneProcedure.php +++ b/app/Api/Procedure/SwimlaneProcedure.php @@ -3,6 +3,7 @@ namespace Kanboard\Api\Procedure; use Kanboard\Api\Authorization\ProjectAuthorization; +use Kanboard\Model\SwimlaneModel; /** * Swimlane API controller @@ -15,7 +16,7 @@ class SwimlaneProcedure extends BaseProcedure public function getActiveSwimlanes($project_id) { ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getActiveSwimlanes', $project_id); - return $this->swimlaneModel->getSwimlanes($project_id); + return $this->swimlaneModel->getAllByStatus($project_id, SwimlaneModel::ACTIVE); } public function getAllSwimlanes($project_id) @@ -42,16 +43,10 @@ class SwimlaneProcedure extends BaseProcedure return $this->swimlaneModel->getById($swimlane_id); } - public function getDefaultSwimlane($project_id) - { - ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getDefaultSwimlane', $project_id); - return $this->swimlaneModel->getDefault($project_id); - } - public function addSwimlane($project_id, $name, $description = '') { ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'addSwimlane', $project_id); - return $this->swimlaneModel->create(array('project_id' => $project_id, 'name' => $name, 'description' => $description)); + return $this->swimlaneModel->create($project_id, $name, $description); } public function updateSwimlane($swimlane_id, $name, $description = null) diff --git a/app/Api/Procedure/TaskProcedure.php b/app/Api/Procedure/TaskProcedure.php index c43e5876..847d336f 100644 --- a/app/Api/Procedure/TaskProcedure.php +++ b/app/Api/Procedure/TaskProcedure.php @@ -68,7 +68,7 @@ class TaskProcedure extends BaseProcedure return $this->taskModel->remove($task_id); } - public function moveTaskPosition($project_id, $task_id, $column_id, $position, $swimlane_id = 0) + public function moveTaskPosition($project_id, $task_id, $column_id, $position, $swimlane_id) { ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'moveTaskPosition', $project_id); return $this->taskPositionModel->movePosition($project_id, $task_id, $column_id, $position, $swimlane_id); @@ -87,7 +87,7 @@ class TaskProcedure extends BaseProcedure } public function createTask($title, $project_id, $color_id = '', $column_id = 0, $owner_id = 0, $creator_id = 0, - $date_due = '', $description = '', $category_id = 0, $score = 0, $swimlane_id = 0, $priority = 0, + $date_due = '', $description = '', $category_id = 0, $score = 0, $swimlane_id = null, $priority = 0, $recurrence_status = 0, $recurrence_trigger = 0, $recurrence_factor = 0, $recurrence_timeframe = 0, $recurrence_basedate = 0, $reference = '', array $tags = array(), $date_started = '') { |