* adjust for getBuildPairs.

This commit is contained in:
王怡栋
2022-11-22 17:25:29 +08:00
parent d09370ba2d
commit 3de3777bfa
3 changed files with 7 additions and 6 deletions
+3 -3
View File
@@ -130,7 +130,7 @@ class projectrelease extends control
$this->commonAction($projectID);
/* Get the builds that can select. */
$builds = $this->build->getBuildPairs($this->view->product->id, $this->view->branch, 'notrunk,withbranch|noproject', $projectID, 'project');
$builds = $this->build->getBuildPairs($this->view->product->id, $this->view->branch, 'notrunk,withbranch|hasproject', $projectID, 'project');
$releasedBuilds = $this->projectrelease->getReleasedBuilds($projectID);
foreach($releasedBuilds as $build) unset($builds[$build]);
unset($builds['trunk']);
@@ -187,7 +187,7 @@ class projectrelease extends control
$bindBuilds = $this->build->getByList($release->build);
/* Get the builds that can select. */
$builds = $this->build->getBuildPairs($release->product, $release->branch, 'notrunk|withbranch|noproject', $this->session->project, 'project', '', false);
$builds = $this->build->getBuildPairs($release->product, $release->branch, 'notrunk|withbranch|hasproject', $this->session->project, 'project', '', false);
$releasedBuilds = $this->projectrelease->getReleasedBuilds($this->session->project);
foreach($releasedBuilds as $releasedBuild)
{
@@ -808,7 +808,7 @@ class projectrelease extends control
*/
public function ajaxLoadBuilds($projectID, $productID, $branch = 0)
{
$builds = $this->loadModel('build')->getBuildPairs($productID, $branch, 'notrunk,withbranch,noproject', $projectID, 'project', '', false);
$builds = $this->loadModel('build')->getBuildPairs($productID, $branch, 'notrunk,withbranch,hasproject', $projectID, 'project', '', false);
$releasedBuilds = $this->projectrelease->getReleasedBuilds($projectID);
foreach($releasedBuilds as $build) unset($builds[$build]);
unset($builds['trunk']);