From 41ef3c7578c18a4881e73e6fa6fb25d43d4cec66 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Thu, 2 Jan 2025 16:36:55 +0800 Subject: [PATCH] * [task#135778,doing,1h]. --- module/bug/control.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 022e26cf0f..8fd4dee3d1 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -107,7 +107,7 @@ class bug extends control * @access public * @return void */ - public function browse(int $productID = 0, string $branch = '', string $browseType = '', int $param = 0, string $orderBy = '', int $recTotal = 0, int $recPerPage = 20, int $pageID = 1) + public function browse(int $productID = 0, string $branch = '', string $browseType = '', int $param = 0, string $orderBy = '', int $recTotal = 0, int $recPerPage = 20, int $pageID = 1, string $from = 'bug', int $blockID = 0) { /* 把访问的产品ID等状态信息保存到session和cookie中。*/ /* Save the product id user last visited to session and cookie. */ @@ -134,12 +134,27 @@ class bug extends control list($moduleID, $queryID, $realOrderBy, $pager) = $this->bugZen->prepareBrowseParams($browseType, $param, $orderBy, $recTotal, $recPerPage, $pageID); if(!isset($modules[$moduleID])) $moduleID = 0; - $this->bugZen->buildBrowseSearchForm($productID, $branch, $queryID); + $actionURL = $this->createLink('bug', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&from=$from&blockID=$blockID"); + $this->bugZen->buildBrowseSearchForm($productID, $branch, $queryID, $actionURL); $executions = $this->loadModel('execution')->fetchPairs($this->projectID, 'all', 'empty|withdelete|hideMultiple'); $bugs = $this->bugZen->getBrowseBugs((int)$product->id, $branch, $browseType, array_keys($executions), $moduleID, $queryID, $realOrderBy, $pager); $this->bugZen->buildBrowseView($bugs, (object)$product, $branch, $browseType, $moduleID, $executions, $param, $orderBy, $pager); + + $this->view->from = $from; + $this->view->blockID = $blockID; + if($from === 'doc') + { + $docBlock = $this->loadModel('doc')->getDocBlock($blockID); + $this->view->docBlock = $docBlock; + if($docBlock) + { + $content = json_decode($docBlock->content, true); + if(isset($content['idList'])) $this->view->idList = $content['idList']; + } + } + $this->view->modules = $modules; $this->display(); }