From 14713b0ec7ed93ca45578da069ad4e19a7d8addf Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 28 May 2016 19:48:22 -0400 Subject: Rename all models --- app/Controller/BaseController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/Controller/BaseController.php') diff --git a/app/Controller/BaseController.php b/app/Controller/BaseController.php index ad02f708..36871bb4 100644 --- a/app/Controller/BaseController.php +++ b/app/Controller/BaseController.php @@ -33,7 +33,7 @@ abstract class BaseController extends Base */ protected function checkWebhookToken() { - if ($this->config->get('webhook_token') !== $this->request->getStringParam('token')) { + if ($this->configModel->get('webhook_token') !== $this->request->getStringParam('token')) { $this->response->text('Not Authorized', 401); } } @@ -49,7 +49,7 @@ abstract class BaseController extends Base protected function getTask() { $project_id = $this->request->getIntegerParam('project_id'); - $task = $this->taskFinder->getDetails($this->request->getIntegerParam('task_id')); + $task = $this->taskFinderModel->getDetails($this->request->getIntegerParam('task_id')); if (empty($task)) { throw new PageNotFoundException(); @@ -78,7 +78,7 @@ abstract class BaseController extends Base if ($task_id > 0) { $model = 'taskFile'; - $project_id = $this->taskFinder->getProjectId($task_id); + $project_id = $this->taskFinderModel->getProjectId($task_id); if ($project_id !== $this->request->getIntegerParam('project_id')) { throw new AccessForbiddenException(); @@ -106,7 +106,7 @@ abstract class BaseController extends Base protected function getProject($project_id = 0) { $project_id = $this->request->getIntegerParam('project_id', $project_id); - $project = $this->project->getByIdWithOwner($project_id); + $project = $this->projectModel->getByIdWithOwner($project_id); if (empty($project)) { throw new PageNotFoundException(); @@ -125,7 +125,7 @@ abstract class BaseController extends Base */ protected function getUser() { - $user = $this->user->getById($this->request->getIntegerParam('user_id', $this->userSession->getId())); + $user = $this->userModel->getById($this->request->getIntegerParam('user_id', $this->userSession->getId())); if (empty($user)) { throw new PageNotFoundException(); @@ -147,7 +147,7 @@ abstract class BaseController extends Base */ protected function getSubtask() { - $subtask = $this->subtask->getById($this->request->getIntegerParam('subtask_id')); + $subtask = $this->subtaskModel->getById($this->request->getIntegerParam('subtask_id')); if (empty($subtask)) { throw new PageNotFoundException(); -- cgit v1.2.3