summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-28 20:26:23 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-28 20:26:23 -0400
commit937079709514c037959d691c0d653c39d5ea84e6 (patch)
tree37e0d6c28c0b2294d433e48e454358ced66ac6c9 /app/Controller
parent729c933d001d699837d90d151acbed1093a8c6f5 (diff)
Minor fixes
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/CategoryController.php2
-rw-r--r--app/Controller/ColumnController.php2
-rw-r--r--app/Controller/CommentController.php2
-rw-r--r--app/Controller/CustomFilterController.php9
-rw-r--r--app/Controller/SubtaskController.php2
-rw-r--r--app/Controller/SwimlaneController.php2
-rw-r--r--app/Controller/TaskExternalLinkController.php2
7 files changed, 14 insertions, 7 deletions
diff --git a/app/Controller/CategoryController.php b/app/Controller/CategoryController.php
index fd1b3f94..dd6e1c35 100644
--- a/app/Controller/CategoryController.php
+++ b/app/Controller/CategoryController.php
@@ -64,7 +64,7 @@ class CategoryController extends BaseController
list($valid, $errors) = $this->categoryValidator->validateCreation($values);
if ($valid) {
- if ($this->categoryModel->create($values)) {
+ if ($this->categoryModel->create($values) !== false) {
$this->flash->success(t('Your category have been created successfully.'));
return $this->response->redirect($this->helper->url->to('CategoryController', 'index', array('project_id' => $project['id'])));
} else {
diff --git a/app/Controller/ColumnController.php b/app/Controller/ColumnController.php
index 8bf3d562..95fbcaaa 100644
--- a/app/Controller/ColumnController.php
+++ b/app/Controller/ColumnController.php
@@ -66,7 +66,7 @@ class ColumnController extends BaseController
list($valid, $errors) = $this->columnValidator->validateCreation($values);
if ($valid) {
- if ($this->columnModel->create($project['id'], $values['title'], $values['task_limit'], $values['description'])) {
+ if ($this->columnModel->create($project['id'], $values['title'], $values['task_limit'], $values['description']) !== false) {
$this->flash->success(t('Column created successfully.'));
return $this->response->redirect($this->helper->url->to('ColumnController', 'index', array('project_id' => $project['id'])), true);
} else {
diff --git a/app/Controller/CommentController.php b/app/Controller/CommentController.php
index 696d240f..2a8c258a 100644
--- a/app/Controller/CommentController.php
+++ b/app/Controller/CommentController.php
@@ -76,7 +76,7 @@ class CommentController extends BaseController
list($valid, $errors) = $this->commentValidator->validateCreation($values);
if ($valid) {
- if ($this->commentModel->create($values)) {
+ if ($this->commentModel->create($values) !== false) {
$this->flash->success(t('Comment added successfully.'));
} else {
$this->flash->failure(t('Unable to create your comment.'));
diff --git a/app/Controller/CustomFilterController.php b/app/Controller/CustomFilterController.php
index 8bba0856..e5f674cd 100644
--- a/app/Controller/CustomFilterController.php
+++ b/app/Controller/CustomFilterController.php
@@ -18,6 +18,9 @@ class CustomFilterController extends BaseController
* Display list of filters
*
* @access public
+ * @param array $values
+ * @param array $errors
+ * @throws \Kanboard\Core\Controller\PageNotFoundException
*/
public function index(array $values = array(), array $errors = array())
{
@@ -47,7 +50,7 @@ class CustomFilterController extends BaseController
list($valid, $errors) = $this->customFilterValidator->validateCreation($values);
if ($valid) {
- if ($this->customFilterModel->create($values)) {
+ if ($this->customFilterModel->create($values) !== false) {
$this->flash->success(t('Your custom filter have been created successfully.'));
return $this->response->redirect($this->helper->url->to('CustomFilterController', 'index', array('project_id' => $project['id'])));
} else {
@@ -101,6 +104,10 @@ class CustomFilterController extends BaseController
* Edit a custom filter (display the form)
*
* @access public
+ * @param array $values
+ * @param array $errors
+ * @throws AccessForbiddenException
+ * @throws \Kanboard\Core\Controller\PageNotFoundException
*/
public function edit(array $values = array(), array $errors = array())
{
diff --git a/app/Controller/SubtaskController.php b/app/Controller/SubtaskController.php
index 46061122..93dab5cd 100644
--- a/app/Controller/SubtaskController.php
+++ b/app/Controller/SubtaskController.php
@@ -54,7 +54,7 @@ class SubtaskController extends BaseController
list($valid, $errors) = $this->subtaskValidator->validateCreation($values);
if ($valid) {
- if ($this->subtaskModel->create($values)) {
+ if ($this->subtaskModel->create($values) !== false) {
$this->flash->success(t('Sub-task added successfully.'));
} else {
$this->flash->failure(t('Unable to create your sub-task.'));
diff --git a/app/Controller/SwimlaneController.php b/app/Controller/SwimlaneController.php
index 4b9567e6..c7c20ce8 100644
--- a/app/Controller/SwimlaneController.php
+++ b/app/Controller/SwimlaneController.php
@@ -81,7 +81,7 @@ class SwimlaneController extends BaseController
list($valid, $errors) = $this->swimlaneValidator->validateCreation($values);
if ($valid) {
- if ($this->swimlaneModel->create($values)) {
+ if ($this->swimlaneModel->create($values) !== false) {
$this->flash->success(t('Your swimlane have been created successfully.'));
return $this->response->redirect($this->helper->url->to('SwimlaneController', 'index', array('project_id' => $project['id'])));
} else {
diff --git a/app/Controller/TaskExternalLinkController.php b/app/Controller/TaskExternalLinkController.php
index f3c6050d..9c04eb00 100644
--- a/app/Controller/TaskExternalLinkController.php
+++ b/app/Controller/TaskExternalLinkController.php
@@ -76,7 +76,7 @@ class TaskExternalLinkController extends BaseController
$values = $this->request->getValues();
list($valid, $errors) = $this->externalLinkValidator->validateCreation($values);
- if ($valid && $this->taskExternalLinkModel->create($values)) {
+ if ($valid && $this->taskExternalLinkModel->create($values) !== false) {
$this->flash->success(t('Link added successfully.'));
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true);
}