* Code for task #78672.

This commit is contained in:
Yagami
2022-12-07 14:49:29 +08:00
parent 57dbeba6d9
commit cea279faf1
2 changed files with 23 additions and 0 deletions
+15
View File
@@ -35,6 +35,21 @@ class projectreleaseModel extends model
$release->branch = trim($release->branch, ',');
$release->build = trim($release->build, ',');
$builds = $this->dao->select('id, branch, filePath, scmPath, name, execution, project')->from(TABLE_BUILD)->where('id')->in($release->build)->fetchAll();
/* Get release's branches by build. */
$branches = array();
if($release->productType != 'normal')
{
foreach($builds as $build)
{
$branch = explode(',', $build->branch);
if(is_array($branch)) $branches += $branch;
}
}
$release->branches = $branches;
$this->loadModel('file');
$release = $this->file->replaceImgURL($release, 'desc');
$release->files = $this->file->getByObject('release', $releaseID);
+8
View File
@@ -373,6 +373,14 @@
?>
</td>
</tr>
<?php if($product->type != 'normal'):?>
<tr>
<th><?php echo $lang->release->branch;?></th>
<td>
<?php foreach($release->branches as $branchID) echo zget($branches, $branchID, '') . ' ';?>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->release->status;?></th>
<td><?php echo $this->processStatus('release', $release);?></td>