* Fix bug.
This commit is contained in:
@@ -818,6 +818,7 @@ class productModel extends model
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->orderBy($orderBy)
|
||||
->fetchAll('id');
|
||||
$executionList = array('0' => '');
|
||||
|
||||
$project = $this->loadModel('program')->getPRJByID($this->session->PRJ);
|
||||
|
||||
|
||||
@@ -2941,12 +2941,10 @@ class projectModel extends model
|
||||
* @param array $products
|
||||
* @param int $queryID
|
||||
* @param string $actionURL
|
||||
* @param array $projects
|
||||
* @param string $type projectBuild
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function buildProjectBuildSearchForm($products, $queryID, $actionURL, $projects = '', $type = '')
|
||||
public function buildProjectBuildSearchForm($products, $queryID, $actionURL)
|
||||
{
|
||||
$this->loadModel('build');
|
||||
|
||||
@@ -2955,11 +2953,6 @@ class projectModel extends model
|
||||
$this->config->build->search['actionURL'] = $actionURL;
|
||||
$this->config->build->search['queryID'] = $queryID;
|
||||
$this->config->build->search['params']['product']['values'] = $products;
|
||||
if($type == 'projectBuild')
|
||||
{
|
||||
$this->config->build->search['fields']['project'] = $this->lang->projectCommon;
|
||||
$this->config->build->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $projects);
|
||||
}
|
||||
|
||||
$this->loadModel('search')->setSearchParams($this->config->build->search);
|
||||
}
|
||||
|
||||
@@ -22,27 +22,31 @@ class projectBuild extends control
|
||||
public function browse($projectID = 0, $type = 'all', $param = 0)
|
||||
{
|
||||
$this->loadModel('project');
|
||||
$this->loadModel('build');
|
||||
$project = $this->loadModel('program')->getPRJByID($projectID);
|
||||
|
||||
/* Get products' list. */
|
||||
$products = $this->project->getProducts($projectID, false);
|
||||
$products = array('' => '') + $products;
|
||||
|
||||
$projects = $this->project->getExecutionsByProject((int)$projectID, 'all', '', true);
|
||||
|
||||
/* Build the search form. */
|
||||
$type = strtolower($type);
|
||||
$queryID = ($type == 'bysearch') ? (int)$param : 0;
|
||||
$queryID = ($type == 'bysearch') ? (int)$param : 0;
|
||||
$actionURL = $this->createLink('projectbuild', 'browse', "projectID=$projectID&type=bysearch&queryID=myQueryID");
|
||||
|
||||
$projects = $this->project->getExecutionsByProject($projectID, 'all', '', true);
|
||||
$this->config->build->search['fields']['project'] = $this->project->lang->projectCommon;
|
||||
$this->config->build->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $projects);
|
||||
|
||||
$this->project->buildProjectBuildSearchForm($products, $queryID, $actionURL, $projects, 'projectBuild');
|
||||
|
||||
if($type == 'bysearch')
|
||||
{
|
||||
$builds = $this->loadModel('build')->getProjectBuildsBySearch((int)$projectID, (int)$param);
|
||||
$builds = $this->build->getProjectBuildsBySearch((int)$projectID, (int)$param);
|
||||
}
|
||||
else
|
||||
{
|
||||
$builds = $this->loadModel('build')->getProjectBuilds((int)$projectID, $type, $param);
|
||||
$builds = $this->build->getProjectBuilds((int)$projectID, $type, $param);
|
||||
}
|
||||
|
||||
/* Set project builds. */
|
||||
|
||||
Reference in New Issue
Block a user