diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-28 19:48:22 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-28 19:48:22 -0400 |
commit | 14713b0ec7ed93ca45578da069ad4e19a7d8addf (patch) | |
tree | 79972d53f6091a1ddb17f64a6a05a5523f5d5168 /app/Controller/TaskInternalLinkController.php | |
parent | 936376ffe74c583d3cb819e98f53a85137fdf8bc (diff) |
Rename all models
Diffstat (limited to 'app/Controller/TaskInternalLinkController.php')
-rw-r--r-- | app/Controller/TaskInternalLinkController.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/Controller/TaskInternalLinkController.php b/app/Controller/TaskInternalLinkController.php index 4018c3a5..a140f1ff 100644 --- a/app/Controller/TaskInternalLinkController.php +++ b/app/Controller/TaskInternalLinkController.php @@ -22,7 +22,7 @@ class TaskInternalLinkController extends BaseController */ private function getTaskLink() { - $link = $this->taskLink->getById($this->request->getIntegerParam('link_id')); + $link = $this->taskLinkModel->getById($this->request->getIntegerParam('link_id')); if (empty($link)) { throw new PageNotFoundException(); @@ -48,7 +48,7 @@ class TaskInternalLinkController extends BaseController 'values' => $values, 'errors' => $errors, 'task' => $task, - 'labels' => $this->link->getList(0, false), + 'labels' => $this->linkModel->getList(0, false), ))); } @@ -65,7 +65,7 @@ class TaskInternalLinkController extends BaseController list($valid, $errors) = $this->taskLinkValidator->validateCreation($values); if ($valid) { - if ($this->taskLink->create($values['task_id'], $values['opposite_task_id'], $values['link_id'])) { + if ($this->taskLinkModel->create($values['task_id'], $values['opposite_task_id'], $values['link_id'])) { $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); } @@ -92,7 +92,7 @@ class TaskInternalLinkController extends BaseController $task_link = $this->getTaskLink(); if (empty($values)) { - $opposite_task = $this->taskFinder->getById($task_link['opposite_task_id']); + $opposite_task = $this->taskFinderModel->getById($task_link['opposite_task_id']); $values = $task_link; $values['title'] = '#'.$opposite_task['id'].' - '.$opposite_task['title']; } @@ -102,7 +102,7 @@ class TaskInternalLinkController extends BaseController 'errors' => $errors, 'task_link' => $task_link, 'task' => $task, - 'labels' => $this->link->getList(0, false) + 'labels' => $this->linkModel->getList(0, false) ))); } @@ -119,7 +119,7 @@ class TaskInternalLinkController extends BaseController list($valid, $errors) = $this->taskLinkValidator->validateModification($values); if ($valid) { - if ($this->taskLink->update($values['id'], $values['task_id'], $values['opposite_task_id'], $values['link_id'])) { + if ($this->taskLinkModel->update($values['id'], $values['task_id'], $values['opposite_task_id'], $values['link_id'])) { $this->flash->success(t('Link updated successfully.')); return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])).'#links'); } @@ -156,7 +156,7 @@ class TaskInternalLinkController extends BaseController $this->checkCSRFParam(); $task = $this->getTask(); - if ($this->taskLink->remove($this->request->getIntegerParam('link_id'))) { + if ($this->taskLinkModel->remove($this->request->getIntegerParam('link_id'))) { $this->flash->success(t('Link removed successfully.')); } else { $this->flash->failure(t('Unable to remove this link.')); |