* Finish task #78676.
This commit is contained in:
@@ -1578,7 +1578,13 @@ class productModel extends model
|
||||
if($plan->parent > 0 and isset($parents[$plan->parent])) $plan->title = $parents[$plan->parent] . ' / ' . $plan->title;
|
||||
|
||||
$year = substr($plan->end, 0, 4);
|
||||
$roadmap[$year][$plan->branch][] = $plan;
|
||||
$branchIdList = explode(',', trim($plan->branch, ','));
|
||||
$branchIdList = array_unique($branchIdList);
|
||||
foreach($branchIdList as $branchID)
|
||||
{
|
||||
if($branchID === '') continue;
|
||||
$roadmap[$year][$branchID][] = $plan;
|
||||
}
|
||||
$total++;
|
||||
|
||||
if($count > 0 and $total >= $count) return $this->processRoadmap($roadmap);
|
||||
@@ -1595,7 +1601,13 @@ class productModel extends model
|
||||
foreach($releases as $release)
|
||||
{
|
||||
$year = substr($release->date, 0, 4);
|
||||
$roadmap[$year][$release->branch][] = $release;
|
||||
$branchIdList = explode(',', trim($release->branch, ','));
|
||||
$branchIdList = array_unique($branchIdList);
|
||||
foreach($branchIdList as $branchID)
|
||||
{
|
||||
if($branchID === '') continue;
|
||||
$roadmap[$year][$branchID][] = $release;
|
||||
}
|
||||
$total++;
|
||||
|
||||
if($count > 0 and $total >= $count) return $this->processRoadmap($roadmap);
|
||||
|
||||
@@ -35,20 +35,9 @@ 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)
|
||||
{
|
||||
$branchIdList = explode(',', $build->branch);
|
||||
foreach($branchIdList as $branchID) $branches[$branchID] = $branchID;
|
||||
}
|
||||
}
|
||||
|
||||
$release->branches = $branches;
|
||||
$release->branches = array();
|
||||
$branchIdList = explode(',', $release->branch);
|
||||
foreach($branchIdList as $branchID) $release->branches[$branchID] = $branchID;
|
||||
|
||||
$this->loadModel('file');
|
||||
$release = $this->file->replaceImgURL($release, 'desc');
|
||||
|
||||
@@ -377,7 +377,13 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->release->branch;?></th>
|
||||
<td>
|
||||
<?php foreach($release->branches as $branchID) echo zget($branches, $branchID, '') . ' ';?>
|
||||
<?php
|
||||
foreach($release->branches as $branchID)
|
||||
{
|
||||
echo zget($branches, $branchID, '');
|
||||
if($branchID != end($release->branches)) echo ', ';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -31,21 +31,11 @@ class releaseModel extends model
|
||||
->fetch();
|
||||
if(!$release) return false;
|
||||
|
||||
$builds = $this->dao->select('id, branch, filePath, scmPath, name, execution, project')->from(TABLE_BUILD)->where('id')->in($release->build)->fetchAll();
|
||||
$release->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)
|
||||
{
|
||||
$branchIdList = explode(',', $build->branch);
|
||||
foreach($branchIdList as $branchID) $branches[$branchID] = $branchID;
|
||||
}
|
||||
}
|
||||
|
||||
$release->builds = $builds;
|
||||
$release->branches = $branches;
|
||||
$release->branches = array();
|
||||
$branchIdList = explode(',', trim($release->branch, ','));
|
||||
foreach($branchIdList as $branchID) $release->branches[$branchID] = $branchID;
|
||||
|
||||
$this->loadModel('file');
|
||||
$release = $this->file->replaceImgURL($release, 'desc');
|
||||
|
||||
@@ -382,7 +382,13 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->release->branch;?></th>
|
||||
<td>
|
||||
<?php foreach($release->branches as $branchID) echo zget($branches, $branchID, '') . ' ';?>
|
||||
<?php
|
||||
foreach($release->branches as $branchID)
|
||||
{
|
||||
echo zget($branches, $branchID, '');
|
||||
if($branchID != end($release->branches)) echo ', ';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
|
||||
Reference in New Issue
Block a user