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/Validator | |
parent | 936376ffe74c583d3cb819e98f53a85137fdf8bc (diff) |
Rename all models
Diffstat (limited to 'app/Validator')
-rw-r--r-- | app/Validator/AuthValidator.php | 4 | ||||
-rw-r--r-- | app/Validator/GroupValidator.php | 4 | ||||
-rw-r--r-- | app/Validator/LinkValidator.php | 6 | ||||
-rw-r--r-- | app/Validator/ProjectValidator.php | 4 | ||||
-rw-r--r-- | app/Validator/TaskLinkValidator.php | 4 | ||||
-rw-r--r-- | app/Validator/UserValidator.php | 4 |
6 files changed, 13 insertions, 13 deletions
diff --git a/app/Validator/AuthValidator.php b/app/Validator/AuthValidator.php index cd6e04d5..14d66ee4 100644 --- a/app/Validator/AuthValidator.php +++ b/app/Validator/AuthValidator.php @@ -59,7 +59,7 @@ class AuthValidator extends Base $result = true; $errors = array(); - if ($this->userLocking->isLocked($values['username'])) { + if ($this->userLockingModel->isLocked($values['username'])) { $result = false; $errors['login'] = t('Your account is locked for %d minutes', BRUTEFORCE_LOCKDOWN_DURATION); $this->logger->error('Account locked: '.$values['username']); @@ -100,7 +100,7 @@ class AuthValidator extends Base $result = true; $errors = array(); - if ($this->userLocking->hasCaptcha($values['username'])) { + if ($this->userLockingModel->hasCaptcha($values['username'])) { if (! isset($this->sessionStorage->captcha)) { $result = false; } else { diff --git a/app/Validator/GroupValidator.php b/app/Validator/GroupValidator.php index 2226abd3..2946ca23 100644 --- a/app/Validator/GroupValidator.php +++ b/app/Validator/GroupValidator.php @@ -4,7 +4,7 @@ namespace Kanboard\Validator; use SimpleValidator\Validator; use SimpleValidator\Validators; -use Kanboard\Model\Group; +use Kanboard\Model\GroupModel; /** * Group Validator @@ -63,7 +63,7 @@ class GroupValidator extends Base return array( new Validators\Required('name', t('The name is required')), new Validators\MaxLength('name', t('The maximum length is %d characters', 100), 100), - new Validators\Unique('name', t('The name must be unique'), $this->db->getConnection(), Group::TABLE, 'id'), + new Validators\Unique('name', t('The name must be unique'), $this->db->getConnection(), GroupModel::TABLE, 'id'), new Validators\MaxLength('external_id', t('The maximum length is %d characters', 255), 255), new Validators\Integer('id', t('This value must be an integer')), ); diff --git a/app/Validator/LinkValidator.php b/app/Validator/LinkValidator.php index 10a826da..2a9967a2 100644 --- a/app/Validator/LinkValidator.php +++ b/app/Validator/LinkValidator.php @@ -4,7 +4,7 @@ namespace Kanboard\Validator; use SimpleValidator\Validator; use SimpleValidator\Validators; -use Kanboard\Model\Link; +use Kanboard\Model\LinkModel; /** * Link Validator @@ -25,7 +25,7 @@ class LinkValidator extends Base { $v = new Validator($values, array( new Validators\Required('label', t('Field required')), - new Validators\Unique('label', t('This label must be unique'), $this->db->getConnection(), Link::TABLE), + new Validators\Unique('label', t('This label must be unique'), $this->db->getConnection(), LinkModel::TABLE), new Validators\NotEquals('label', 'opposite_label', t('The labels must be different')), )); @@ -48,7 +48,7 @@ class LinkValidator extends Base new Validators\Required('id', t('Field required')), new Validators\Required('opposite_id', t('Field required')), new Validators\Required('label', t('Field required')), - new Validators\Unique('label', t('This label must be unique'), $this->db->getConnection(), Link::TABLE), + new Validators\Unique('label', t('This label must be unique'), $this->db->getConnection(), LinkModel::TABLE), )); return array( diff --git a/app/Validator/ProjectValidator.php b/app/Validator/ProjectValidator.php index 1c6c90f8..b1406a2f 100644 --- a/app/Validator/ProjectValidator.php +++ b/app/Validator/ProjectValidator.php @@ -4,7 +4,7 @@ namespace Kanboard\Validator; use SimpleValidator\Validator; use SimpleValidator\Validators; -use Kanboard\Model\Project; +use Kanboard\Model\ProjectModel; /** * Project Validator @@ -34,7 +34,7 @@ class ProjectValidator extends Base new Validators\MaxLength('start_date', t('The maximum length is %d characters', 10), 10), new Validators\MaxLength('end_date', t('The maximum length is %d characters', 10), 10), new Validators\AlphaNumeric('identifier', t('This value must be alphanumeric')) , - new Validators\Unique('identifier', t('The identifier must be unique'), $this->db->getConnection(), Project::TABLE), + new Validators\Unique('identifier', t('The identifier must be unique'), $this->db->getConnection(), ProjectModel::TABLE), ); } diff --git a/app/Validator/TaskLinkValidator.php b/app/Validator/TaskLinkValidator.php index c88c2b16..1c167e4c 100644 --- a/app/Validator/TaskLinkValidator.php +++ b/app/Validator/TaskLinkValidator.php @@ -4,7 +4,7 @@ namespace Kanboard\Validator; use SimpleValidator\Validator; use SimpleValidator\Validators; -use Kanboard\Model\Task; +use Kanboard\Model\TaskModel; /** * Task Link Validator @@ -27,7 +27,7 @@ class TaskLinkValidator extends Base new Validators\Required('opposite_task_id', t('Field required')), new Validators\Required('link_id', t('Field required')), new Validators\NotEquals('opposite_task_id', 'task_id', t('A task cannot be linked to itself')), - new Validators\Exists('opposite_task_id', t('This linked task id doesn\'t exists'), $this->db->getConnection(), Task::TABLE, 'id') + new Validators\Exists('opposite_task_id', t('This linked task id doesn\'t exists'), $this->db->getConnection(), TaskModel::TABLE, 'id') ); } diff --git a/app/Validator/UserValidator.php b/app/Validator/UserValidator.php index e5953f30..1a24f23e 100644 --- a/app/Validator/UserValidator.php +++ b/app/Validator/UserValidator.php @@ -4,7 +4,7 @@ namespace Kanboard\Validator; use SimpleValidator\Validator; use SimpleValidator\Validators; -use Kanboard\Model\User; +use Kanboard\Model\UserModel; /** * User Validator @@ -25,7 +25,7 @@ class UserValidator extends Base return array( new Validators\MaxLength('role', t('The maximum length is %d characters', 25), 25), 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\Email('email', t('Email address invalid')), new Validators\Integer('is_ldap_user', t('This value must be an integer')), ); |