25 $has_save_confirmation = ($this->
getRecord()->getTable()->getSaveConfirmation() && !isset(
$_GET[
'record_id']));
26 $is_confirmed = (bool) (isset(
$_POST[
'save_confirmed']));
28 if (is_array(
$file) &&
$file[
'tmp_name'] !=
"" && (!$has_save_confirmation || $is_confirmed)) {
30 $file_obj->setType(
"file");
31 $file_obj->setTitle(
$file[
"name"]);
32 $file_obj->setFileName(
$file[
"name"]);
34 $file_obj->setFileSize(
$file[
"size"]);
35 $file_obj->setMode(
"object");
38 if ($has_save_confirmation) {
40 $file_obj->storeUnzipedFile($move_file,
$file[
"name"]);
42 $move_file =
$file[
'tmp_name'];
43 $file_obj->getUploadFile($move_file,
$file[
"name"]);
48 $file_id = $file_obj->getId();
51 } elseif (is_array(
$file) && isset(
$file[
'tmp_name']) &&
$file[
'tmp_name'] !=
"") {
112 $file_name = $file_obj->getFileName();
135 return $file_obj->getTitle();
144 if (
$form->getItemByPostVar(
"field_" . $this->getField()->getId())->getDeletionFlag()) {
160 if (!$record_field || !$record_field->getValue()) {
164 $file_old =
new ilObjFile($record_field->getValue(),
false);
165 $file_new = $file_old->cloneObject(null, null,
true);
static getCloneOf($id, $type)
Class ilDclBaseFieldModel.
addHiddenItem($a_post_var, $a_value)
Add hidden item.
Class ilDclBaseFieldModel.
addHiddenItemsToConfirmation(ilConfirmationGUI &$confirmation)
setValue($value, $omit_parsing=false)
Set value for record field.
static getMimeType($a_file='', $a_filename='', $a_mime='')
if(isset($_POST['submit'])) $form
doUpdate()
Update object in database.
parseSortingValue($value, $link=true)
Returns sortable value for the specific field-types.
loadValue()
Load the value.
static getRecordFieldCache($record, $field)
static _lookupType($a_id, $a_reference=false)
static _exists($a_id, $a_reference=false, $a_type=null)
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
Confirmation screen class.