summaryrefslogtreecommitdiff
path: root/app/Import
diff options
context:
space:
mode:
Diffstat (limited to 'app/Import')
-rw-r--r--app/Import/TaskImport.php14
-rw-r--r--app/Import/UserImport.php6
2 files changed, 10 insertions, 10 deletions
diff --git a/app/Import/TaskImport.php b/app/Import/TaskImport.php
index 2abafe14..f5ca9b0e 100644
--- a/app/Import/TaskImport.php
+++ b/app/Import/TaskImport.php
@@ -69,7 +69,7 @@ class TaskImport extends Base
$row = $this->prepare($row);
if ($this->validateCreation($row)) {
- if ($this->taskCreation->create($row) > 0) {
+ if ($this->taskCreationModel->create($row) > 0) {
$this->logger->debug('TaskImport: imported successfully line '.$line_number);
$this->counter++;
} else {
@@ -100,27 +100,27 @@ class TaskImport extends Base
$values['time_spent'] = (float) $row['time_spent'];
if (! empty($row['assignee'])) {
- $values['owner_id'] = $this->user->getIdByUsername($row['assignee']);
+ $values['owner_id'] = $this->userModel->getIdByUsername($row['assignee']);
}
if (! empty($row['creator'])) {
- $values['creator_id'] = $this->user->getIdByUsername($row['creator']);
+ $values['creator_id'] = $this->userModel->getIdByUsername($row['creator']);
}
if (! empty($row['color'])) {
- $values['color_id'] = $this->color->find($row['color']);
+ $values['color_id'] = $this->colorModel->find($row['color']);
}
if (! empty($row['column'])) {
- $values['column_id'] = $this->column->getColumnIdByTitle($this->projectId, $row['column']);
+ $values['column_id'] = $this->columnModel->getColumnIdByTitle($this->projectId, $row['column']);
}
if (! empty($row['category'])) {
- $values['category_id'] = $this->category->getIdByName($this->projectId, $row['category']);
+ $values['category_id'] = $this->categoryModel->getIdByName($this->projectId, $row['category']);
}
if (! empty($row['swimlane'])) {
- $values['swimlane_id'] = $this->swimlane->getIdByName($this->projectId, $row['swimlane']);
+ $values['swimlane_id'] = $this->swimlaneModel->getIdByName($this->projectId, $row['swimlane']);
}
if (! empty($row['date_due'])) {
diff --git a/app/Import/UserImport.php b/app/Import/UserImport.php
index 64300d77..c877e82a 100644
--- a/app/Import/UserImport.php
+++ b/app/Import/UserImport.php
@@ -2,7 +2,7 @@
namespace Kanboard\Import;
-use Kanboard\Model\User;
+use Kanboard\Model\UserModel;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
use Kanboard\Core\Security\Role;
@@ -56,7 +56,7 @@ class UserImport extends Base
$row = $this->prepare($row);
if ($this->validateCreation($row)) {
- if ($this->user->create($row)) {
+ if ($this->userModel->create($row)) {
$this->logger->debug('UserImport: imported successfully line '.$line_number);
$this->counter++;
} else {
@@ -109,7 +109,7 @@ class UserImport extends Base
{
$v = new Validator($values, array(
new Validators\MaxLength('username', t('The maximum length is %d characters', 50), 50),
- new Validators\Unique('username', t('The username must be unique'), $this->db->getConnection(), User::TABLE, 'id'),
+ new Validators\Unique('username', t('The username must be unique'), $this->db->getConnection(), UserModel::TABLE, 'id'),
new Validators\MinLength('password', t('The minimum length is %d characters', 6), 6),
new Validators\Email('email', t('Email address invalid')),
new Validators\Integer('is_ldap_user', t('This value must be an integer')),