* Compatible parameter type.
This commit is contained in:
@@ -105,7 +105,7 @@ class bug extends control
|
||||
/* Save the product id user last visited to session and cookie. */
|
||||
$productID = $this->product->checkAccess($productID, $this->products);
|
||||
$product = $this->product->getByID($productID);
|
||||
$branch = $this->bugZen->getBrowseBranch($branch, $product->type);
|
||||
$branch = $this->bugZen->getBrowseBranch($branch, (string)$product->type);
|
||||
$browseType = $browseType ? strtolower($browseType) : 'unclosed';
|
||||
|
||||
/* 设置1.5级导航相关信息。*/
|
||||
@@ -116,7 +116,7 @@ class bug extends control
|
||||
/* Set the order field. */
|
||||
if(!$orderBy) $orderBy = $this->cookie->qaBugOrder ? $this->cookie->qaBugOrder : 'id_desc';
|
||||
|
||||
$this->bugZen->setBrowseCookie($product, $branch, $browseType, $param, $orderBy);
|
||||
$this->bugZen->setBrowseCookie((object)$product, $branch, $browseType, $param, $orderBy);
|
||||
|
||||
$this->bugZen->setBrowseSession($browseType);
|
||||
|
||||
@@ -127,9 +127,9 @@ class bug extends control
|
||||
$this->bugZen->buildBrowseSearchForm($productID, $branch, $queryID);
|
||||
|
||||
$executions = $this->loadModel('execution')->getPairs($this->projectID, 'all', 'empty|withdelete|hideMultiple');
|
||||
$bugs = $this->bugZen->getBrowseBugs($product->id, $branch, $browseType, array_keys($executions), $moduleID, $queryID, $realOrderBy, $pager);
|
||||
$bugs = $this->bugZen->getBrowseBugs((int)$product->id, $branch, $browseType, array_keys($executions), $moduleID, $queryID, $realOrderBy, $pager);
|
||||
|
||||
$this->bugZen->buildBrowseView($bugs, $product, $branch, $browseType, $moduleID, $executions, $param, $orderBy, $pager);
|
||||
$this->bugZen->buildBrowseView($bugs, (object)$product, $branch, $browseType, $moduleID, $executions, $param, $orderBy, $pager);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
+6
-5
@@ -231,7 +231,8 @@ class bugZen extends bug
|
||||
*/
|
||||
private function getBranchOptions(int $productID): array
|
||||
{
|
||||
$branches = $this->loadModel('branch')->getList($productID, 0, 'all');
|
||||
$branches = $this->loadModel('branch')->getList($productID, 0, 'all');
|
||||
$branchTagOption = array();
|
||||
foreach($branches as $branchInfo)
|
||||
{
|
||||
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
|
||||
@@ -1028,7 +1029,7 @@ class bugZen extends bug
|
||||
/* 获取分支列表。*/
|
||||
/* Get branch options. */
|
||||
$branchTagOption = array();
|
||||
if($product->type != 'normal') $branchTagOption = $this->getBranchOptions($product->id);
|
||||
if($product->type != 'normal') $branchTagOption = $this->getBranchOptions((int)$product->id);
|
||||
|
||||
/* 获取需求和任务的 id 列表。*/
|
||||
/* Get story and task id list. */
|
||||
@@ -1052,12 +1053,12 @@ class bugZen extends bug
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($product->id, 'bug', $showModule) : array();
|
||||
$this->view->modules = $this->tree->getOptionMenu($product->id, 'bug', 0, $branch);
|
||||
$this->view->moduleTree = $this->tree->getTreeMenu($product->id, 'bug', 0, array('treeModel', 'createBugLink'), array(), $branch);
|
||||
$this->view->modules = $this->tree->getOptionMenu((int)$product->id, 'bug', 0, $branch);
|
||||
$this->view->moduleTree = $this->tree->getTreeMenu((int)$product->id, 'bug', 0, array('treeModel', 'createBugLink'), array(), $branch);
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->projectPairs = $this->loadModel('project')->getPairsByProgram();
|
||||
$this->view->executions = $executions;
|
||||
$this->view->plans = $this->loadModel('productplan')->getPairs($product->id);
|
||||
$this->view->plans = $this->loadModel('productplan')->getPairs((int)$product->id);
|
||||
$this->view->tasks = $this->loadModel('task')->getPairsByIdList($taskIdList);
|
||||
$this->view->stories = $this->loadModel('story')->getPairsByList($storyIdList);
|
||||
$this->view->builds = $this->loadModel('build')->getBuildPairs(array($product->id), $branch);
|
||||
|
||||
Reference in New Issue
Block a user