* bug: rename the $output parameter to $kanbanInfo.

This commit is contained in:
liugang
2023-05-19 16:31:27 +08:00
parent 6424575615
commit 4c407e36f7
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -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);
}
+4 -4
View File
@@ -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);