* fix for bug #175

This commit is contained in:
wangyidong
2011-03-20 02:03:41 +00:00
parent 993e94c484
commit ede9985390
2 changed files with 5 additions and 3 deletions
+3 -3
View File
@@ -46,7 +46,7 @@ class buildModel extends model
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
->where('t1.project')->eq((int)$projectID)
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date DESC,t1.id desc')
->orderBy('t1.date DESC , t1.id desc')
->fetchAll();
}
@@ -69,7 +69,7 @@ class buildModel extends model
->where('project')->eq((int)$projectID)
->beginIF($productID)->andWhere('product')->eq((int)$productID)->fi()
->andWhere('deleted')->eq(0)
->orderBy('id desc')->fetchPairs();
->orderBy('date desc , id desc')->fetchPairs();
if(!$builds) return $sysBuilds;
$releases = $this->dao->select('build,name')->from(TABLE_RELEASE)
->where('build')->in(array_keys($builds))
@@ -96,7 +96,7 @@ class buildModel extends model
$builds = $this->dao->select('id,name')->from(TABLE_BUILD)
->where('product')->eq((int)$productID)
->andWhere('deleted')->eq(0)
->orderBy('id desc')->fetchPairs();
->orderBy('date desc , id desc')->fetchPairs();
if(!$builds) return $sysBuilds;
return $sysBuilds + $builds;
}
+2
View File
@@ -19,6 +19,7 @@
</caption>
<thead>
<tr class='colhead'>
<th class='w-id'><?php echo $lang->build->id;?></th>
<th class='w-120px'><?php echo $lang->build->product;?></th>
<th><?php echo $lang->build->name;?></th>
<th><?php echo $lang->build->scmPath;?></th>
@@ -31,6 +32,7 @@
<tbody>
<?php foreach($builds as $build):?>
<tr class='a-center'>
<td><?php echo $build->id;?></td>
<td><?php echo $build->productName;?></td>
<td class='a-left'><?php echo html::a($this->createLink('build', 'view', "build=$build->id"), $build->name);?></td>
<td class='a-left nobr'><?php strpos($build->scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?></td>