* adjust buildSearchForm method: put setSearchParams method in model.
This commit is contained in:
@@ -105,7 +105,6 @@ class bug extends control
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('bug', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID");
|
||||
$this->bug->buildSearchForm($productID, $this->products, $queryID, $actionURL);
|
||||
$this->loadModel('search')->setSearchParams($this->config->bug->search);
|
||||
|
||||
/* Set view. */
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common;
|
||||
|
||||
@@ -68,7 +68,6 @@ class company extends control
|
||||
$queryID = $type == 'bydept' ? 0 : (int)$param;
|
||||
$actionURL = $this->createLink('company', 'browse', "param=myQueryID&type=bysearch");
|
||||
$this->company->buildSearchForm($queryID, $actionURL);
|
||||
$this->loadModel('search')->setSearchParams($this->config->company->browse->search);
|
||||
|
||||
/* Get users. */
|
||||
$users = $this->company->getUsers($type, $queryID, $deptID, $sort, $pager);
|
||||
|
||||
@@ -137,5 +137,7 @@ class companyModel extends model
|
||||
$this->config->company->browse->search['actionURL'] = $actionURL;
|
||||
$this->config->company->browse->search['queryID'] = $queryID;
|
||||
$this->config->company->browse->search['params']['dept']['values'] = array('' => '') + $this->loadModel('dept')->getOptionMenu();
|
||||
|
||||
$this->loadModel('search')->setSearchParams($this->config->company->browse->search);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,6 @@ class doc extends control
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('doc', 'browse', "libID=$libID&moduleID=$moduleID&procuctID=$productID&projectID=$projectID&browseType=bySearch&queryID=myQueryID");
|
||||
$this->doc->buildSearchForm($libID, $this->libs, $queryID, $actionURL);
|
||||
$this->search->setSearchParams($this->config->doc->search);
|
||||
|
||||
$this->view->libID = $libID;
|
||||
$this->view->libName = $this->libs[$libID];
|
||||
|
||||
@@ -324,6 +324,8 @@ class docModel extends model
|
||||
$moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($libID, 'customdoc', $startModuleID = 0);
|
||||
}
|
||||
$this->config->doc->search['params']['module']['values'] = $moduleOptionMenu;
|
||||
|
||||
$this->search->setSearchParams($this->config->doc->search);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -145,7 +145,6 @@ class product extends control
|
||||
/* Build search form. */
|
||||
$actionURL = $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID");
|
||||
$this->product->buildSearchForm($productID, $this->products, $queryID, $actionURL);
|
||||
$this->loadModel('search')->setSearchParams($this->config->product->search);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $this->products[$productID]. $this->lang->colon . $this->lang->product->browse;
|
||||
|
||||
@@ -427,6 +427,8 @@ class productModel extends model
|
||||
$this->config->product->search['fields']['branch'] = $this->lang->product->branch;
|
||||
$this->config->product->search['params']['branch']['values'] = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty');
|
||||
}
|
||||
|
||||
$this->loadModel('search')->setSearchParams($this->config->product->search);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -166,7 +166,6 @@ class project extends control
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('project', 'task', "projectID=$projectID&status=bySearch¶m=myQueryID");
|
||||
$this->project->buildSearchForm($projectID, $this->projects, $queryID, $actionURL);
|
||||
$this->search->setSearchParams($this->config->project->search);
|
||||
|
||||
/* team member pairs. */
|
||||
$memberPairs = array();
|
||||
|
||||
@@ -1774,5 +1774,7 @@ class projectModel extends model
|
||||
$this->config->project->search['queryID'] = $queryID;
|
||||
$this->config->project->search['params']['project']['values'] = array(''=>'', $projectID => $projects[$projectID], 'all' => $this->lang->project->allProject);
|
||||
$this->config->project->search['params']['module']['values'] = $this->loadModel('tree')->getTaskOptionMenu($projectID, $startModuleID = 0);
|
||||
|
||||
$this->search->setSearchParams($this->config->project->search);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,6 @@ class testcase extends control
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID");
|
||||
$this->testcase->buildSearchForm($productID, $this->products, $queryID, $actionURL);
|
||||
$this->loadModel('search')->setSearchParams($this->config->testcase->search);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->common;
|
||||
@@ -649,7 +648,6 @@ class testcase extends control
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('testcase', 'linkCases', "caseID=$caseID&browseType=bySearch&queryID=myQueryID", '', true);
|
||||
$this->testcase->buildSearchForm($case->product, $this->products, $queryID, $actionURL);
|
||||
$this->loadModel('search')->setSearchParams($this->config->testcase->search);
|
||||
|
||||
/* Get cases to link. */
|
||||
$cases2Link = $this->testcase->getCases2Link($caseID, $browseType, $queryID);
|
||||
|
||||
@@ -857,5 +857,7 @@ class testcaseModel extends model
|
||||
}
|
||||
$this->config->testcase->search['actionURL'] = $actionURL;
|
||||
$this->config->testcase->search['queryID'] = $queryID;
|
||||
|
||||
$this->loadModel('search')->setSearchParams($this->config->testcase->search);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user