* Adjust repo link task filter rule.
This commit is contained in:
@@ -931,7 +931,7 @@ class repo extends control
|
||||
|
||||
$this->view->modules = $modules;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->allTasks = $this->repoZen->getLinkTasks($repoID, $revision, $browseType, $product, $orderBy, $pager, $queryID, $productExecutionIDs);
|
||||
$this->view->allTasks = $this->repoZen->getLinkTasks($repoID, $revision, $browseType, $orderBy, $pager, $queryID, $productExecutionIDs);
|
||||
$this->view->product = $product;
|
||||
$this->view->repoID = $repoID;
|
||||
$this->view->revision = $revision;
|
||||
|
||||
+11
-5
@@ -1058,7 +1058,6 @@ class repoZen extends repo
|
||||
* @param int $repoID
|
||||
* @param string $revision
|
||||
* @param string $browseType
|
||||
* @param object $product
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param int $queryID
|
||||
@@ -1066,13 +1065,20 @@ class repoZen extends repo
|
||||
* @access protected
|
||||
* @return array
|
||||
*/
|
||||
protected function getLinkTasks(int $repoID, string $revision, string $browseType, object $product, string $orderBy, object $pager, int $queryID, array $productExecutionIDs): array
|
||||
protected function getLinkTasks(int $repoID, string $revision, string $browseType, string $orderBy, object $pager, int $queryID, array $productExecutionIDs): array
|
||||
{
|
||||
$allTasks = array();
|
||||
foreach($productExecutionIDs as $productExecutionID)
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$tasks = $this->loadModel('execution')->getTasks(0, $productExecutionID, array(), $browseType, $queryID, 0, $orderBy, null);
|
||||
$allTasks = array_merge($tasks, $allTasks);
|
||||
$allTasks = $this->loadModel('execution')->getTasks(0, 0, array(), $browseType, $queryID, 0, $orderBy, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($productExecutionIDs as $productExecutionID)
|
||||
{
|
||||
$tasks = $this->loadModel('execution')->getTasks(0, $productExecutionID, array(), $browseType, $queryID, 0, $orderBy, null);
|
||||
$allTasks = array_merge($tasks, $allTasks);
|
||||
}
|
||||
}
|
||||
|
||||
/* Filter linked tasks. */
|
||||
|
||||
Reference in New Issue
Block a user