diff --git a/module/bug/control.php b/module/bug/control.php index 2393e25f9c..c6c3aadbe3 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1707,8 +1707,12 @@ class bug extends control * @access public * @return void */ - public function linkBugs($bugID, $browseType = '', $param = 0) + public function linkBugs($bugID, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { + /* Load pager. */ + $this->app->loadClass('pager', $static = true); + $pager = new pager($recTotal, $recPerPage, $pageID); + /* Get bug and queryID. */ $bug = $this->bug->getById($bugID); $queryID = ($browseType == 'bySearch') ? (int)$param : 0; @@ -1722,7 +1726,7 @@ class bug extends control $this->bug->buildSearchForm($bug->product, $this->products, $queryID, $actionURL); /* Get bugs to link. */ - $bugs2Link = $this->bug->getBugs2Link($bugID, $browseType, $queryID); + $bugs2Link = $this->bug->getBugs2Link($bugID, $browseType, $queryID, $pager); /* Assign. */ $this->view->title = $this->lang->bug->linkBugs . "BUG #$bug->id $bug->title - " . $this->products[$bug->product]; @@ -1731,8 +1735,11 @@ class bug extends control $this->view->position[] = $this->lang->bug->linkBugs; $this->view->bug = $bug; $this->view->bugs2Link = $bugs2Link; + $this->view->pager = $pager; $this->view->users = $this->loadModel('user')->getPairs('noletter'); - + $this->view->recTotal = $recTotal; + $this->view->recPerPage = $recPerPage; + $this->view->pageID = $pageID; $this->display(); } diff --git a/module/bug/model.php b/module/bug/model.php index 77ec4f5626..55f1f1bd5d 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1360,12 +1360,12 @@ class bugModel extends model * @access public * @return array */ - public function getBugs2Link($bugID, $browseType = 'bySearch', $queryID = 0) + public function getBugs2Link($bugID, $browseType = 'bySearch', $queryID = 0, $pager) { if($browseType == 'bySearch') { $bug = $this->getById($bugID); - $bugs2Link = $this->getBySearch($bug->product, 'all', $queryID, 'id'); + $bugs2Link = $this->getBySearch($bug->product, 'all', $queryID, 'id', '', $pager); foreach($bugs2Link as $key => $bug2Link) { if($bug2Link->id == $bugID) unset($bugs2Link[$key]); diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 416333c950..7f714340d2 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -470,7 +470,6 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
- show('right', 'pagerjs');?> diff --git a/module/bug/view/linkbugs.html.php b/module/bug/view/linkbugs.html.php index b6d6e378aa..ed8c2708ea 100644 --- a/module/bug/view/linkbugs.html.php +++ b/module/bug/view/linkbugs.html.php @@ -67,6 +67,7 @@
id);?> +show('right', 'pagerjs');?> diff --git a/module/testtask/control.php b/module/testtask/control.php index 5322cf2772..76876c67e1 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -243,7 +243,8 @@ class testtask extends control $productID = $productID ? $productID : key($this->products); $executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, '', 'id_desc', $projectID); $builds = empty($productID) ? array() : $this->loadModel('build')->getBuildPairs($productID, 'all', 'notrunk'); - + a($projectID); + a($productID); $testreports = $this->testtask->getTestReportPairsByBuild($build); /* Set menu. */