summaryrefslogtreecommitdiff
path: root/app/Controller/BaseController.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-28 19:48:22 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-28 19:48:22 -0400
commit14713b0ec7ed93ca45578da069ad4e19a7d8addf (patch)
tree79972d53f6091a1ddb17f64a6a05a5523f5d5168 /app/Controller/BaseController.php
parent936376ffe74c583d3cb819e98f53a85137fdf8bc (diff)
Rename all models
Diffstat (limited to 'app/Controller/BaseController.php')
-rw-r--r--app/Controller/BaseController.php12
1 files changed, 6 insertions, 6 deletions
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();