* Fix bug.

This commit is contained in:
leiyong
2020-12-04 11:28:46 +08:00
parent a50371c577
commit 5dacb41729
3 changed files with 11 additions and 13 deletions
+9 -5
View File
@@ -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. */