From 67014fc6b76be37bf03a33d2d8dff72805e72a87 Mon Sep 17 00:00:00 2001 From: "chencongzhi520@gmail.com" Date: Fri, 21 Dec 2012 06:09:46 +0000 Subject: [PATCH] * code for bug#360. --- module/bug/control.php | 4 ++-- module/build/model.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 8a236a5d24..7ae375ff28 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -126,8 +126,8 @@ class bug extends control $users = $this->user->getPairs('noletter'); /* Process the openedBuild and resolvedBuild fields. */ - foreach($bugs as $bug) $productIdList[] = $bug->product; - $builds = $this->loadModel('build')->getProductBuildPairs($productIdList); + foreach($bugs as $bug) $productIdList[$bug->id] = $bug->product; + $builds = $this->loadModel('build')->getProductBuildPairs(array_unique($productIdList)); foreach($bugs as $key => $bug) { $openBuildIdList = explode(',', $bug->openedBuild); diff --git a/module/build/model.php b/module/build/model.php index 53334fcc14..f03c75a983 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -97,7 +97,7 @@ class buildModel extends model if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk'); $builds = $this->dao->select('id,name')->from(TABLE_BUILD) - ->where('product')->eq($products) + ->where('product')->in($products) ->andWhere('deleted')->eq(0) ->orderBy('date desc, id desc')->fetchPairs(); if(!$builds) return $sysBuilds;