* Finish task#8059.

This commit is contained in:
leiyong
2020-10-09 17:42:15 +08:00
parent d12a45cb02
commit 81d9b1de5d
14 changed files with 25 additions and 68 deletions
+1 -6
View File
@@ -127,18 +127,13 @@ class bug extends control
/* Load pager. */
$this->app->loadClass('pager', $static = true);
if($this->app->getViewType() == 'mhtml') $recPerPage = 10;
$pager = pager::init(0, $recPerPage, $pageID);
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Get projects. */
$projects = $this->loadModel('project')->getPairs('empty|withdelete');
/* Get bugs. */
$bugs = $this->bug->getBugs($productID, $projects, $branch, $browseType, $moduleID, $queryID, $sort, $pager);
if(empty($bugs) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
$bugs = $this->bug->getBugs($productID, $projects, $branch, $browseType, $moduleID, $queryID, $sort, $pager);
}
/* Process the sql, get the conditon partion, save it to session. */
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug', $browseType == 'needconfirm' ? false : true);