From c053468aa65687e07de50931029b0b5d1a89ac2b Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 22 Feb 2022 11:05:45 +0800 Subject: [PATCH 1/2] * Fix bug. --- module/bug/control.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 7860b7dd81..fbb370ca21 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1530,9 +1530,9 @@ class bug extends control */ public function batchResolve($resolution, $resolvedBuild = '') { - $bugIDList = $this->post->bugIDList ? $this->post->bugIDList : return print(js::locate($this->session->bugList, 'parent')); - $bugIDList = array_unique($bugIDList); + if(!isset($this->post->bugIDList)) return print(js::locate($this->session->bugList, 'parent')); + $bugIDList = array_unique($this->post->bugIDList); $changes = $this->bug->batchResolve($bugIDList, $resolution, $resolvedBuild); if(dao::isError()) return print(js::error(dao::getError())); @@ -1766,8 +1766,9 @@ class bug extends control return print(js::locate($this->session->bugList, 'parent')); } - $bugIDList = $this->post->bugIDList ? $this->post->bugIDList : return print(js::locate($this->session->bugList, 'parent')); - $bugIDList = array_unique($bugIDList); + if(!isset($this->post->bugIDList)) return print(js::locate($this->session->bugList, 'parent')); + + $bugIDList = array_unique($$this->post->bugIDList); $bugs = $this->dao->select('id, title, status, resolvedBy, openedBuild')->from(TABLE_BUG)->where('id')->in($bugIDList)->fetchAll('id'); $this->qa->setMenu($this->products, $productID, $branch); From 8cac8975bbdf23e53c16255c7dbc7de3f720e40d Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 22 Feb 2022 11:09:16 +0800 Subject: [PATCH 2/2] * Adjust code. --- module/bug/control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index fbb370ca21..b9027f4e94 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1530,7 +1530,7 @@ class bug extends control */ public function batchResolve($resolution, $resolvedBuild = '') { - if(!isset($this->post->bugIDList)) return print(js::locate($this->session->bugList, 'parent')); + if(!$this->post->bugIDList) return print(js::locate($this->session->bugList, 'parent')); $bugIDList = array_unique($this->post->bugIDList); $changes = $this->bug->batchResolve($bugIDList, $resolution, $resolvedBuild); @@ -1766,7 +1766,7 @@ class bug extends control return print(js::locate($this->session->bugList, 'parent')); } - if(!isset($this->post->bugIDList)) return print(js::locate($this->session->bugList, 'parent')); + if(!$this->post->bugIDList) return print(js::locate($this->session->bugList, 'parent')); $bugIDList = array_unique($$this->post->bugIDList); $bugs = $this->dao->select('id, title, status, resolvedBy, openedBuild')->from(TABLE_BUG)->where('id')->in($bugIDList)->fetchAll('id');