if ($oOFP->bCheck(WYPATH_CHECK_JUSTIMAGE | WYPATH_CHECK_NOPATH)) { $oElement->newImageAfter($iImageID - 1); // insert new slot, only if upload happened AND is ok $oElement->useUploadedImageFileForID($oFP, $oOFP, $iImageID); } else { $goApp->log('Illegal file/type on image upload: ' . $oOFP->sPath); $sResponse .= '<span style="color:red">' . WYTS('FileUploadErrorUnknown') . ' "' . $oOFP->sPath . ""</span><br />\n"; $iNrOfErrors++; $iImageID--; $bHasError = true; } $oFU->deleteTmpFile($j); } if (!$bHasError) { // if no errors $oElement->setTextForID($iImageID, $oTA->sText); $oElement->save(); $sResponse .= WYTS('ImageSaved') . ' (' . $oOFP->sPath . ")<br />"; } } } } else { // ...and there is no new image (edit of caption and/or image) if ($oFU->bFileUploaded(0) && !$oFU->bUploadOK(0)) { $sResponse .= $oFU->sErrorMessage(true, 0); $iNrOfErrors++; $bHasError = true; } else { if ($oFU->bFileUploaded(0)) { $oFP =& $oFU->oFilePath(0); $oOFP =& $oFU->oOriginalFilename(0);