* adjust for getBuildPairs.
This commit is contained in:
@@ -202,7 +202,7 @@ class buildModel extends model
|
||||
*
|
||||
* @param int|array $products
|
||||
* @param string|int $branch
|
||||
* @param string $params noempty|notrunk|noterminate|withbranch, can be a set of them
|
||||
* @param string $params noempty|notrunk|noterminate|withbranch|hasproject|noDeleted|singled, can be a set of them
|
||||
* @param string|int $objectID
|
||||
* @param string $objectType
|
||||
* @param int|array $buildIdList
|
||||
@@ -235,6 +235,7 @@ class buildModel extends model
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t5')->on('t1.product = t5.id')
|
||||
->where('1=1')
|
||||
->beginIF(strpos($params, 'hasDeleted') === false)->andWhere('t1.deleted')->eq(0)->fi()
|
||||
->beginIF(strpos($params, 'hasproject') !== false)->andWhere('t1.project')->ne(0)->fi()
|
||||
->beginIF(strpos($params, 'singled') !== false)->andWhere('t1.execution')->ne(0)->fi()
|
||||
->beginIF($products)->andWhere('t1.product')->in($products)->fi()
|
||||
->beginIF($objectType === 'execution' and $objectID)->andWhere('t1.execution')->eq($objectID)->fi()
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -82,7 +82,7 @@ class release extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $message, 'locate' => inlink('view', "releaseID=$releaseID")));
|
||||
}
|
||||
|
||||
$builds = $this->loadModel('build')->getBuildPairs($productID, $branch, 'notrunk|withbranch|noproject', 0, 'execution', '', false);
|
||||
$builds = $this->loadModel('build')->getBuildPairs($productID, $branch, 'notrunk|withbranch|hasproject', 0, 'execution', '', false);
|
||||
$releasedBuilds = $this->release->getReleasedBuilds($productID, $branch);
|
||||
foreach($releasedBuilds as $build) unset($builds[$build]);
|
||||
|
||||
@@ -139,7 +139,7 @@ class release extends control
|
||||
$release = $this->release->getById((int)$releaseID);
|
||||
$this->commonAction($release->product);
|
||||
|
||||
$builds = $this->loadModel('build')->getBuildPairs($release->product, $release->branch, 'notrunk|withbranch|noproject', 0, 'project', $release->build, false);
|
||||
$builds = $this->loadModel('build')->getBuildPairs($release->product, $release->branch, 'notrunk|withbranch|hasproject', 0, 'project', $release->build, false);
|
||||
$releasedBuilds = $this->release->getReleasedBuilds($release->product);
|
||||
foreach($releasedBuilds as $releasedBuild)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user