diff --git a/module/api/control.php b/module/api/control.php index 7e22526c07..465dc9e730 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -485,7 +485,7 @@ class api extends control $this->view->objectID = $objectID; $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->users = $this->user->getPairs('nocode|noclosed'); - $this->view->projects = $this->loadModel('project')->getPairsByModel('scrum,waterfall,agileplus,waterfallplus'); + $this->view->projects = $this->loadModel('project')->getPairsByModel(array('scrum', 'waterfall', 'agileplus', 'waterfallplus')); $this->view->products = $this->loadModel('product')->getPairs(); $this->display(); diff --git a/module/project/model.php b/module/project/model.php index 89baa0116a..742ea90214 100755 --- a/module/project/model.php +++ b/module/project/model.php @@ -932,7 +932,7 @@ class projectModel extends model if($model == 'waterfallplus') $model = array('waterfall', 'waterfallplus'); /* Set first program to the project attribute. */ - $model = $model == 'all' ? array() : explode(',', $model); + $model = $model == 'all' ? array() : (array)$model; $multiple = strpos($param, 'multiple') !== false; foreach($projects as $projectID => $project) {