* Fix block delete.

This commit is contained in:
Yagami
2019-03-26 15:01:01 +08:00
parent a16d4f3c67
commit 0b0882cba8
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ function deleteBlock(index)
}
else
{
$('#block' + index).remove();
window.location.reload(true);
}
});
}
+7 -1
View File
@@ -672,7 +672,13 @@ class testcaseModel extends model
{
$parentStepID = 0;
$isLibCase = ($oldCase->lib and empty($oldCase->product));
if($isLibCase) $this->dao->update(TABLE_CASE)->set('`fromCaseVersion`')->eq($version)->where('`fromCaseID`')->eq($caseID)->exec();
if($isLibCase)
{
$fromcaseVersion = $this->dao->select('fromCaseVersion')->from(TABLE_CASE)->where('fromCaseID')->eq($caseID)->fetch('fromCaseVersion');
$fromcaseVersion += 1;
$this->dao->update(TABLE_CASE)->set('`fromCaseVersion`')->eq($fromcaseVersion)->where('`fromCaseID`')->eq($caseID)->exec();
}
foreach($this->post->steps as $stepID => $stepDesc)
{
if(empty($stepDesc)) continue;