* fix bug#457.

This commit is contained in:
xia0ta0
2013-08-26 15:07:45 +08:00
parent 26ce3673b5
commit 36024ce40a
+3 -1
View File
@@ -115,7 +115,8 @@ class testcase extends control
$queryProductID = $productID;
$allProduct = "`product` = 'all'";
$caseQuery = $this->session->testcaseQuery;
$caseQuery = '(' . $this->session->testcaseQuery;
if(strpos($this->session->testcaseQuery, $allProduct) !== false)
{
$products = array_keys($this->loadModel('product')->getPrivProducts());
@@ -123,6 +124,7 @@ class testcase extends control
$caseQuery = $caseQuery . ' AND `product`' . helper::dbIN(array_keys($products));
$queryProductID = 'all';
}
$caseQuery .= ')';
$caseQuery = $this->loadModel('search')->replaceDynamic($caseQuery);
$this->view->cases = $this->dao->select('*')->from(TABLE_CASE)->where($caseQuery)