* fix bug #2542.
This commit is contained in:
@@ -455,7 +455,6 @@ class caselibModel extends model
|
||||
{
|
||||
$caseID = $data->id[$key];
|
||||
$stepChanged = false;
|
||||
$steps = array();
|
||||
$oldStep = isset($oldSteps[$caseID]) ? $oldSteps[$caseID] : array();
|
||||
$oldCase = $oldCases[$caseID];
|
||||
|
||||
@@ -469,8 +468,8 @@ class caselibModel extends model
|
||||
if(empty($desc)) continue;
|
||||
$step = new stdclass();
|
||||
$step->type = $data->stepType[$key][$id];
|
||||
$step->desc = $desc;
|
||||
$step->expect = trim($data->expect[$key][$id]);
|
||||
$step->desc = htmlspecialchars($desc);
|
||||
$step->expect = htmlspecialchars(trim($data->expect[$key][$id]));
|
||||
|
||||
$steps[] = $step;
|
||||
}
|
||||
@@ -552,8 +551,8 @@ class caselibModel extends model
|
||||
$stepData->parent = ($stepData->type == 'item') ? $parentStepID : 0;
|
||||
$stepData->case = $caseID;
|
||||
$stepData->version = 1;
|
||||
$stepData->desc = $desc;
|
||||
$stepData->expect = $data->expect[$key][$id];
|
||||
$stepData->desc = htmlspecialchars($desc);
|
||||
$stepData->expect = htmlspecialchars(trim($data->expect[$key][$id]));
|
||||
$this->dao->insert(TABLE_CASESTEP)->data($stepData)->autoCheck()->exec();
|
||||
if($stepData->type == 'group') $parentStepID = $this->dao->lastInsertID();
|
||||
if($stepData->type == 'step') $parentStepID = 0;
|
||||
|
||||
@@ -109,9 +109,9 @@ $(function()
|
||||
{
|
||||
echo html::submitButton($submitText);
|
||||
if($dataInsert !== '') echo html::hidden('insert', $dataInsert);
|
||||
echo html::hidden('isEndPage', $isEndPage ? 1 : 0);
|
||||
echo html::hidden('pagerID', $pagerID);
|
||||
}
|
||||
echo html::hidden('isEndPage', $isEndPage ? 1 : 0);
|
||||
echo html::hidden('pagerID', $pagerID);
|
||||
echo ' ' . html::backButton();
|
||||
echo ' ' . sprintf($lang->file->importPager, $allCount, $pagerID, $allPager);
|
||||
?>
|
||||
|
||||
@@ -1145,7 +1145,6 @@ class testcaseModel extends model
|
||||
if($caseID)
|
||||
{
|
||||
$stepChanged = false;
|
||||
$steps = array();
|
||||
$oldStep = isset($oldSteps[$caseID]) ? $oldSteps[$caseID] : array();
|
||||
$oldCase = $oldCases[$caseID];
|
||||
|
||||
@@ -1159,8 +1158,8 @@ class testcaseModel extends model
|
||||
if(empty($desc)) continue;
|
||||
$step = new stdclass();
|
||||
$step->type = $data->stepType[$key][$id];
|
||||
$step->desc = htmlspecialchars($desc);
|
||||
$step->expect = htmlspecialchars(trim($this->post->expect[$key][$id]));
|
||||
$step->desc = htmlspecialchars($desc);
|
||||
$step->expect = htmlspecialchars(trim($this->post->expect[$key][$id]));
|
||||
|
||||
$steps[] = $step;
|
||||
}
|
||||
@@ -1208,8 +1207,8 @@ class testcaseModel extends model
|
||||
$stepData->parent = ($stepData->type == 'item') ? $parentStepID : 0;
|
||||
$stepData->case = $caseID;
|
||||
$stepData->version = $version;
|
||||
$stepData->desc = htmlspecialchars($step['desc']);
|
||||
$stepData->expect = htmlspecialchars($step['expect']);
|
||||
$stepData->desc = $step['desc'];
|
||||
$stepData->expect = $step['expect'];
|
||||
$this->dao->insert(TABLE_CASESTEP)->data($stepData)->autoCheck()->exec();
|
||||
if($stepData->type == 'group') $parentStepID = $this->dao->lastInsertID();
|
||||
if($stepData->type == 'step') $parentStepID = 0;
|
||||
|
||||
@@ -134,9 +134,9 @@ $(function()
|
||||
{
|
||||
echo html::submitButton($submitText);
|
||||
if($dataInsert !== '') echo html::hidden('insert', $dataInsert);
|
||||
echo html::hidden('isEndPage', $isEndPage ? 1 : 0);
|
||||
echo html::hidden('pagerID', $pagerID);
|
||||
}
|
||||
echo html::hidden('isEndPage', $isEndPage ? 1 : 0);
|
||||
echo html::hidden('pagerID', $pagerID);
|
||||
echo ' ' . html::backButton();
|
||||
echo ' ' . sprintf($lang->file->importPager, $allCount, $pagerID, $allPager);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user