* code for task#1678.

This commit is contained in:
xia0ta0
2013-08-08 16:08:15 +08:00
parent 88e92a19aa
commit 36bbaf711e
5 changed files with 51 additions and 32 deletions
+13
View File
@@ -100,6 +100,19 @@ class buildModel extends model
->where('product')->in($products)
->andWhere('deleted')->eq(0)
->orderBy('date desc, id desc')->fetchPairs();
if(strpos($params, 'release') !== false)
{
$releases = $this->dao->select('build,name')->from(TABLE_RELEASE)
->where('product')->in($products)
->andWhere('deleted')->eq(0)
->fetchPairs('build');
foreach($builds as $key => $build)
{
if($key and isset($releases[$key])) $builds[$key] = $releases[$key];
}
}
if(!$builds) return $sysBuilds;
return $sysBuilds + $builds;
}