* adjust code for bug module.
This commit is contained in:
@@ -91,8 +91,7 @@ class bug extends control
|
||||
$projects = $this->loadModel('project')->getPairs() + array('0' => '');
|
||||
|
||||
/* Get bugs. */
|
||||
$childModuleIds = ($browseType == 'bymodule') ? $this->tree->getAllChildId($moduleID) : array();
|
||||
$bugs = $this->bug->getBugs($productID, $projects, $branch, $browseType, $childModuleIds, $queryID, $sort, $pager);
|
||||
$bugs = $this->bug->getBugs($productID, $projects, $branch, $browseType, $moduleID, $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);
|
||||
|
||||
@@ -207,18 +207,18 @@ class bugModel extends model
|
||||
* @param array $projects
|
||||
* @param int $branch
|
||||
* @param string $browseType
|
||||
* @param array $childModuleIds
|
||||
* @param int $moduleID
|
||||
* @param int $queryID
|
||||
* @param string $sort
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getBugs($productID, $projects, $branch, $browseType, $childModuleIds, $queryID, $sort, $pager)
|
||||
public function getBugs($productID, $projects, $branch, $browseType, $moduleID, $queryID, $sort, $pager)
|
||||
{
|
||||
/* Get bugs by browse type. */
|
||||
if($browseType == 'all') $bugs = $this->getAllBugs($productID, $branch, $projects, $sort, $pager);
|
||||
elseif($browseType == 'bymodule') $bugs = $this->getModuleBugs($productID, $branch, $childModuleIds, $projects, $sort, $pager);
|
||||
elseif($browseType == 'bymodule') $bugs = $this->getModuleBugs($productID, $branch, $this->loadModel('tree')->getAllChildId($moduleID), $projects, $sort, $pager);
|
||||
elseif($browseType == 'assigntome') $bugs = $this->getByAssigntome($productID, $branch, $projects, $sort, $pager);
|
||||
elseif($browseType == 'openedbyme') $bugs = $this->getByOpenedbyme($productID, $branch, $projects, $sort, $pager);
|
||||
elseif($browseType == 'resolvedbyme') $bugs = $this->getByResolvedbyme($productID, $branch, $projects, $sort, $pager);
|
||||
|
||||
Reference in New Issue
Block a user