* Remove gitlab param from getProducts function.
This commit is contained in:
@@ -1545,10 +1545,11 @@ class executionModel extends model
|
||||
* Get products of a execution.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param bool $withBranch
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProducts($executionID, $withBranch = true, $gitlab = false)
|
||||
public function getProducts($executionID, $withBranch = true)
|
||||
{
|
||||
if(defined('TUTORIAL'))
|
||||
{
|
||||
@@ -1556,14 +1557,12 @@ class executionModel extends model
|
||||
return $this->loadModel('tutorial')->getExecutionProducts();
|
||||
}
|
||||
|
||||
|
||||
$query = $this->dao->select('t2.id, t2.name, t2.type, t1.branch, t1.plan')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')
|
||||
->on('t1.product = t2.id')
|
||||
->where('t1.project')->eq((int)$executionID)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->products)->fi();
|
||||
if($gitlab) return implode(',' ,$query->fetchPairs('id','id'));
|
||||
if(!$withBranch) return $query->fetchPairs('id', 'name');
|
||||
return $query->fetchAll('id');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user