* fix for link bug.

This commit is contained in:
wangyidong
2015-05-25 13:43:37 +08:00
parent ef9a2e941a
commit ae4cd7ef86
12 changed files with 52 additions and 51 deletions

View File

@@ -106,7 +106,7 @@ class bug extends control
elseif($browseType == 'longlifebugs') $bugs = $this->bug->getByLonglifebugs($productID, $projects, $sort, $pager);
elseif($browseType == 'postponedbugs') $bugs = $this->bug->getByPostponedbugs($productID, $projects, $sort, $pager);
elseif($browseType == 'needconfirm') $bugs = $this->bug->getByNeedconfirm($productID, $projects, $sort, $pager);
elseif($browseType == 'bysearch') $bugs = $this->bug->getBySearch($productID, $projects, $queryID, $sort, $pager);
elseif($browseType == 'bysearch') $bugs = $this->bug->getBySearch($productID, $queryID, $sort, $pager);
/* Process the sql, get the conditon partion, save it to session. */
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug', $browseType == 'needconfirm' ? false : true);

View File

@@ -820,7 +820,7 @@ class bugModel extends model
*/
public function getReleaseBugs($buildID, $productID)
{
$project = $this->dao->select('t1.begin')
$project = $this->dao->select('t1.id,t1.begin')
->from(TABLE_PROJECT)->alias('t1')
->leftJoin(TABLE_BUILD)->alias('t2')
->on('t1.id = t2.project')
@@ -830,6 +830,7 @@ class bugModel extends model
->where('resolvedDate')->ge($project->begin)
->andWhere('resolution')->ne('postponed')
->andWhere('product')->eq($productID)
->andWhere("(project != '$project->id' OR (project = '$project->id' and openedDate < '$project->begin'))")
->andWhere('deleted')->eq(0)
->orderBy('openedDate ASC')
->fetchAll();
@@ -1455,14 +1456,13 @@ class bugModel extends model
* Get bugs by search.
*
* @param int $productID
* @param array $projects
* @param int $queryID
* @param string $orderBy
* @param object $pager
* @access public
* @return array
*/
public function getBySearch($productID, $projects, $queryID, $orderBy, $pager = null)
public function getBySearch($productID, $queryID, $orderBy, $pager = null)
{
if($queryID)
{
@@ -1482,12 +1482,6 @@ class bugModel extends model
if($this->session->bugQuery == false) $this->session->set('bugQuery', ' 1 = 1');
}
/* check the purview of projects.*/
if(strpos($this->session->bugQuery, '`project`') === false)
{
$var = $this->session->bugQuery . ' AND `project`' . helper::dbIN(array_keys($projects));
$this->session->set('bugQuery', "$var");
}
if(strpos($this->session->bugQuery, '`product`') === false)
{
$var = $this->session->bugQuery . ' AND `product` = ' . $productID;