* adjust for process search sql.

This commit is contained in:
wangyidong
2016-05-31 13:52:44 +08:00
parent 05b5a5fba1
commit cbda3adaee
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1896,7 +1896,7 @@ class bugModel extends model
if(strpos($bugQuery, $allProduct) !== false)
{
$products = array_keys($this->loadModel('product')->getPrivProducts());
$bugQuery = str_replace($allProduct, '1', $this->session->bugQuery);
$bugQuery = str_replace($allProduct, '1', $bugQuery);
$bugQuery = $bugQuery . ' AND `product` ' . helper::dbIN($products);
}
if($branch) $bugQuery .= " AND `branch` in('0','$branch')";
+1 -1
View File
@@ -821,7 +821,7 @@ class projectModel extends model
/* Limit current project when no project. */
if(strpos($taskQuery, "`project` =") === false) $taskQuery = $taskQuery . " AND `project` = $projectID";
$projectQuery = "`project` " . helper::dbIN(array_keys($projects));
$taskQuery = str_replace("`project` = 'all'", $projectQuery, $this->session->taskQuery); // Search all project.
$taskQuery = str_replace("`project` = 'all'", $projectQuery, $taskQuery); // Search all project.
$this->session->set('taskQueryCondition', $taskQuery);
$this->session->set('taskOnlyCondition', true);
$this->session->set('taskOrderBy', $sort);
+2 -2
View File
@@ -1427,9 +1427,9 @@ class storyModel extends model
$allProduct = "`product` = 'all'";
$storyQuery = $this->session->storyQuery;
$queryProductID = $productID;
if(strpos($this->session->storyQuery, $allProduct) !== false)
if(strpos($storyQuery, $allProduct) !== false)
{
$storyQuery = str_replace($allProduct, '1', $this->session->storyQuery);
$storyQuery = str_replace($allProduct, '1', $storyQuery);
$queryProductID = 'all';
}
$storyQuery = $storyQuery . ' AND `product` ' . helper::dbIN(array_keys($products));