diff options
Diffstat (limited to 'app/Model/Project.php')
-rw-r--r-- | app/Model/Project.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/Model/Project.php b/app/Model/Project.php index 6e4cfcfd..8ddcc443 100644 --- a/app/Model/Project.php +++ b/app/Model/Project.php @@ -172,16 +172,20 @@ class Project extends Base { return $this->db->table(self::TABLE)->asc('name')->findAll(); } - + /** * Get all projects with given Ids * * @access public - * @param integer[] $project_ids Projects id + * @param integer[] $project_ids * @return array */ - public function getAllByIds($project_ids) + public function getAllByIds(array $project_ids) { + if (empty($project_ids)) { + return array(); + } + return $this->db->table(self::TABLE)->in('id', $project_ids)->asc('name')->findAll(); } |