* Refactor testcase::confirmChange.
This commit is contained in:
@@ -816,19 +816,20 @@ class testcase extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认用例变更。
|
||||
* Confirm testcase changed.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @param int $taskID
|
||||
* @param string $from
|
||||
* @param string $from view|list
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function confirmChange($caseID, $taskID = 0, $from = 'view')
|
||||
public function confirmChange(int $caseID, int $taskID = 0, string $from = 'view')
|
||||
{
|
||||
$case = $this->testcase->getById($caseID);
|
||||
$this->dao->update(TABLE_TESTRUN)->set('version')->eq($case->version)->where('`case`')->eq($caseID)->exec();
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $from == 'view' ? inlink('view', "caseID=$caseID&version=$case->version&from=testtask&taskID=$taskID") : true));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $from == 'view' ? inlink('view', "caseID={$caseID}&version={$case->version}&from=testtask&taskID={$taskID}") : true));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user