diff options
Diffstat (limited to 'app/Export')
-rw-r--r-- | app/Export/SubtaskExport.php | 24 | ||||
-rw-r--r-- | app/Export/TaskExport.php | 8 | ||||
-rw-r--r-- | app/Export/TransitionExport.php | 4 |
3 files changed, 18 insertions, 18 deletions
diff --git a/app/Export/SubtaskExport.php b/app/Export/SubtaskExport.php index 386c566b..0939838f 100644 --- a/app/Export/SubtaskExport.php +++ b/app/Export/SubtaskExport.php @@ -3,9 +3,9 @@ namespace Kanboard\Export; use Kanboard\Core\Base; -use Kanboard\Model\Task; -use Kanboard\Model\Subtask; -use Kanboard\Model\User; +use Kanboard\Model\TaskModel; +use Kanboard\Model\SubtaskModel; +use Kanboard\Model\UserModel; /** * Subtask Export @@ -34,7 +34,7 @@ class SubtaskExport extends Base */ public function export($project_id, $from, $to) { - $this->subtask_status = $this->subtask->getStatusList(); + $this->subtask_status = $this->subtaskModel->getStatusList(); $subtasks = $this->getSubtasks($project_id, $from, $to); $results = array($this->getColumns()); @@ -106,19 +106,19 @@ class SubtaskExport extends Base $to = $this->dateParser->removeTimeFromTimestamp(strtotime('+1 day', $this->dateParser->getTimestamp($to))); } - return $this->db->table(Subtask::TABLE) + return $this->db->table(SubtaskModel::TABLE) ->eq('project_id', $project_id) ->columns( - Subtask::TABLE.'.*', - User::TABLE.'.username AS assignee_username', - User::TABLE.'.name AS assignee_name', - Task::TABLE.'.title AS task_title' + SubtaskModel::TABLE.'.*', + UserModel::TABLE.'.username AS assignee_username', + UserModel::TABLE.'.name AS assignee_name', + TaskModel::TABLE.'.title AS task_title' ) ->gte('date_creation', $from) ->lte('date_creation', $to) - ->join(Task::TABLE, 'id', 'task_id') - ->join(User::TABLE, 'id', 'user_id') - ->asc(Subtask::TABLE.'.id') + ->join(TaskModel::TABLE, 'id', 'task_id') + ->join(UserModel::TABLE, 'id', 'user_id') + ->asc(SubtaskModel::TABLE.'.id') ->findAll(); } } diff --git a/app/Export/TaskExport.php b/app/Export/TaskExport.php index b98582aa..0e576d33 100644 --- a/app/Export/TaskExport.php +++ b/app/Export/TaskExport.php @@ -4,7 +4,7 @@ namespace Kanboard\Export; use Kanboard\Core\Base; use Kanboard\Core\DateParser; -use Kanboard\Model\Task; +use Kanboard\Model\TaskModel; use PDO; /** @@ -27,7 +27,7 @@ class TaskExport extends Base public function export($project_id, $from, $to) { $tasks = $this->getTasks($project_id, $from, $to); - $swimlanes = $this->swimlane->getList($project_id); + $swimlanes = $this->swimlaneModel->getList($project_id); $results = array($this->getColumns()); foreach ($tasks as &$task) { @@ -102,9 +102,9 @@ class TaskExport extends Base */ public function format(array &$task, array &$swimlanes) { - $colors = $this->color->getList(); + $colors = $this->colorModel->getList(); - $task['is_active'] = $task['is_active'] == Task::STATUS_OPEN ? e('Open') : e('Closed'); + $task['is_active'] = $task['is_active'] == TaskModel::STATUS_OPEN ? e('Open') : e('Closed'); $task['color_id'] = $colors[$task['color_id']]; $task['score'] = $task['score'] ?: 0; $task['swimlane_id'] = isset($swimlanes[$task['swimlane_id']]) ? $swimlanes[$task['swimlane_id']] : '?'; diff --git a/app/Export/TransitionExport.php b/app/Export/TransitionExport.php index 97dc28a7..0df1f70e 100644 --- a/app/Export/TransitionExport.php +++ b/app/Export/TransitionExport.php @@ -25,7 +25,7 @@ class TransitionExport extends Base public function export($project_id, $from, $to) { $results = array($this->getColumns()); - $transitions = $this->transition->getAllByProjectAndDate($project_id, $from, $to); + $transitions = $this->transitionModel->getAllByProjectAndDate($project_id, $from, $to); foreach ($transitions as $transition) { $results[] = $this->format($transition); @@ -68,7 +68,7 @@ class TransitionExport extends Base $transition['src_column'], $transition['dst_column'], $transition['name'] ?: $transition['username'], - date($this->config->get('application_datetime_format', DateParser::DATE_TIME_FORMAT), $transition['date']), + date($this->configModel->get('application_datetime_format', DateParser::DATE_TIME_FORMAT), $transition['date']), round($transition['time_spent'] / 3600, 2) ); |