fix option default values

This commit is contained in:
2014-12-14 14:33:56 +01:00
parent b098615095
commit c7aff3e347
12 changed files with 231 additions and 175 deletions

View File

@@ -149,13 +149,16 @@ class Procedure extends PhpObject
$iDbStepId = $this->oMySql->insertRow(Databap::STEP_TABLE, $asStepData);
//Add new images
$asImgData[MySqlManager::getId(Databap::STEP_TABLE)] = $iDbStepId;
foreach($this->asImages[$iStepId] as $asImageInfo)
if(array_key_exists($iStepId, $this->asImages))
{
$asImgData['description'] = $asImageInfo['desc'];
$asImgData['file_name'] = $asImageInfo['name'];
$iDbImageId = $this->oMySql->insertRow(Databap::IMG_TABLE, $asImgData);
$this->saveImage($asImgData['file_name']);
$asImgData[MySqlManager::getId(Databap::STEP_TABLE)] = $iDbStepId;
foreach($this->asImages[$iStepId] as $asImageInfo)
{
$asImgData['description'] = $asImageInfo['desc'];
$asImgData['file_name'] = $asImageInfo['name'];
$iDbImageId = $this->oMySql->insertRow(Databap::IMG_TABLE, $asImgData);
$this->saveImage($asImgData['file_name']);
}
}
}