diff --git a/module/my/control.php b/module/my/control.php index aacacac5df..5b5da5e708 100755 --- a/module/my/control.php +++ b/module/my/control.php @@ -525,17 +525,16 @@ EOF; * @access public * @return void */ - public function bug($type = 'assignedTo', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function bug(string $type = 'assignedTo', int $param = 0, string $orderBy = 'id_desc', int $recTotal = 0, int $recPerPage = 20, int $pageID = 1) { /* Save session. load Lang. */ $this->loadModel('bug'); - $this->app->loadLang('bug'); - $queryID = ($type == 'bySearch') ? (int)$param : 0; + $queryID = $type == 'bySearch' ? $param : 0; if($type != 'bySearch') $this->session->set('myBugType', $type); if($this->app->viewType != 'json') $this->session->set('bugList', $this->app->getURI(true), 'qa'); /* Load pager. */ - $this->app->loadClass('pager', $static = true); + $this->app->loadClass('pager', true); if($this->app->getViewType() == 'mhtml') $recPerPage = 10; $pager = pager::init($recTotal, $recPerPage, $pageID); @@ -551,9 +550,8 @@ EOF; { $bugs = $this->bug->getUserBugs($this->app->user->account, $type, $sort, 0, $pager, 0, $queryID); } - - $bugs = $this->bug->batchAppendDelayedDays($bugs); $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug', false); + $bugs = $this->bug->batchAppendDelayedDays($bugs); $actionURL = $this->createLink('my', $this->app->rawMethod, "mode=bug&browseType=bySearch&queryID=myQueryID"); $this->my->buildBugSearchForm($queryID, $actionURL); diff --git a/module/my/ui/bug.html.php b/module/my/ui/bug.html.php index e460c9076d..d554054b96 100644 --- a/module/my/ui/bug.html.php +++ b/module/my/ui/bug.html.php @@ -31,6 +31,7 @@ $canBatchClose = common::hasPriv('bug', 'batchClose') && strtolower($type) $canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo'); $canBatchAction = $canBatchEdit || $canBatchConfirm || $canBatchClose || $canBatchAssignTo; +if($type == 'bySearch') $type = $this->session->myBugType; if($type == 'openedBy') unset($config->bug->dtable->fieldList['openedBy']); if($type == 'assignedTo') unset($config->bug->dtable->fieldList['assignedTo']); if($type == 'resolvedBy') unset($config->bug->dtable->fieldList['resolvedBy']);