diff options
| author | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-04-26 20:04:39 -0400 |
|---|---|---|
| committer | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-04-26 20:04:39 -0400 |
| commit | 6551609d1b248011d301080c1be7c48085dc5d55 (patch) | |
| tree | 0b09326b95232338f9f61dfe6268ced206e5b78b /models/project.php | |
| parent | 3332949c8baae581ea70ce5c61bb2a6225100422 (diff) | |
Add a filter by user and due date + minor changes
Diffstat (limited to 'models/project.php')
| -rw-r--r-- | models/project.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/models/project.php b/models/project.php index b2a54571..8b7a2293 100644 --- a/models/project.php +++ b/models/project.php @@ -18,7 +18,7 @@ class Project extends Base const INACTIVE = 0; // Get a list of people that can by assigned for tasks - public function getUsersList($project_id, $prepend = true) + public function getUsersList($project_id, $prepend_unassigned = true, $prepend_everybody = false) { $allowed_users = $this->getAllowedUsers($project_id); $userModel = new User($this->db, $this->event); @@ -27,8 +27,12 @@ class Project extends Base $allowed_users = $userModel->getList(); } - if ($prepend) { - return array(t('Unassigned')) + $allowed_users; + if ($prepend_unassigned) { + $allowed_users = array(t('Unassigned')) + $allowed_users; + } + + if ($prepend_everybody) { + $allowed_users = array(User::EVERYBODY_ID => t('Everybody')) + $allowed_users; } return $allowed_users; |
