* bug: rename the $output parameter to $kanbanInfo.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user