* fix bug#360.

This commit is contained in:
chencongzhi520@gmail.com
2012-12-21 05:55:51 +00:00
parent 0c5b8888ad
commit df2f22fcd6
2 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -85,19 +85,19 @@ class buildModel extends model
/**
* Get builds of a product in pairs.
*
* @param int $productID
* @param mix $products int|array
* @param string $params noempty|notrunk, can be a set of them
* @access public
* @return string
*/
public function getProductBuildPairs($productID, $params = '')
public function getProductBuildPairs($products, $params = '')
{
$sysBuilds = array();
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk');
$builds = $this->dao->select('id,name')->from(TABLE_BUILD)
->where('product')->eq((int)$productID)
->where('product')->eq($products)
->andWhere('deleted')->eq(0)
->orderBy('date desc, id desc')->fetchPairs();
if(!$builds) return $sysBuilds;