Minor fixes
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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.'));
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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.'));
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user