From 4c407e36f71a71d5b8a50bbe6b7348f5a8fc0e36 Mon Sep 17 00:00:00 2001 From: liugang Date: Fri, 19 May 2023 16:31:27 +0800 Subject: [PATCH] * bug: rename the $output parameter to $kanbanInfo. --- module/bug/control.php | 6 +++--- module/bug/model.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 9069e182cc..fd151ec4fb 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -956,11 +956,11 @@ class bug extends control if(!empty($_POST)) { $extra = str_replace(array(',', ' '), array('&', ''), $extra); - parse_str($extra, $output); + parse_str($extra, $kanbanInfo); /* Activate bug. */ $bugData = $this->bugZen->buildBugForActivate($bugID); - $changes = $this->bug->activate($bugData, $output); + $changes = $this->bug->activate($bugData, $kanbanInfo); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); /* Save attachments and record logs. */ @@ -973,7 +973,7 @@ class bug extends control if(isonlybody()) { - $regionID = zget($output, 'regionID', 0); + $regionID = zget($kanbanInfo, 'regionID', 0); $bug = $this->bug->getById($bugID); $this->bugZen->responseInModal($bug->execution, '', $regionID); } diff --git a/module/bug/model.php b/module/bug/model.php index fe5dc9b207..cdca74267c 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1180,11 +1180,11 @@ class bugModel extends model * Activate a bug. * * @param object $bugID - * @param array $output + * @param array $kanbanInfo * @access public * @return array */ - public function activate(object $bug, array $output): array + public function activate(object $bug, array $kanbanInfo): array { $bugID = $bug->id; $oldBug = $this->getById($bugID); @@ -1205,8 +1205,8 @@ class bugModel extends model if($oldBug->execution) { $this->loadModel('kanban'); - if(!isset($output['toColID'])) $this->kanban->updateLane($oldBug->execution, 'bug', $bugID); - if(isset($output['toColID'])) $this->kanban->moveCard($bugID, $output['fromColID'], $output['toColID'], $output['fromLaneID'], $output['toLaneID']); + if(!isset($kanbanInfo['toColID'])) $this->kanban->updateLane($oldBug->execution, 'bug', $bugID); + if(isset($kanbanInfo['toColID'])) $this->kanban->moveCard($bugID, $kanbanInfo['fromColID'], $kanbanInfo['toColID'], $kanbanInfo['fromLaneID'], $kanbanInfo['toLaneID']); } return common::createChanges($oldBug, $bug);