* Adjust the scope of modules when searching for bugs.
This commit is contained in:
@@ -195,7 +195,7 @@ class bug extends control
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('bug', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID");
|
||||
$this->config->bug->search['onMenuBar'] = 'yes';
|
||||
$this->bug->buildSearchForm($productID, $this->products, $queryID, $actionURL);
|
||||
$this->bug->buildSearchForm($productID, $this->products, $queryID, $actionURL, $branch);
|
||||
|
||||
$showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : '';
|
||||
$productName = ($productID and isset($this->products[$productID])) ? $this->products[$productID] : $this->lang->product->allProduct;
|
||||
|
||||
@@ -1415,10 +1415,11 @@ class bugModel extends model
|
||||
* @param array $products
|
||||
* @param int $queryID
|
||||
* @param string $actionURL
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function buildSearchForm($productID, $products, $queryID, $actionURL)
|
||||
public function buildSearchForm($productID, $products, $queryID, $actionURL, $branch = 0)
|
||||
{
|
||||
$projectID = $this->lang->navGroup->bug == 'qa' ? 0 : $this->session->project;
|
||||
$productParams = ($productID and isset($products[$productID])) ? array($productID => $products[$productID]) : $products;
|
||||
@@ -1429,7 +1430,7 @@ class bugModel extends model
|
||||
/* Get all modules. */
|
||||
$modules = array();
|
||||
$this->loadModel('tree');
|
||||
if($productID) $modules = $this->tree->getOptionMenu($productID, 'bug', 0);
|
||||
if($productID) $modules = $this->tree->getOptionMenu($productID, 'bug', 0, $branch);
|
||||
if(!$productID)
|
||||
{
|
||||
foreach($products as $id => $productName) $modules += $this->tree->getOptionMenu($id, 'bug');
|
||||
|
||||
Reference in New Issue
Block a user