5 require_once(
'./Modules/DataCollection/classes/Fields/Base/class.ilDclBaseRecordFieldModel.php');
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"]);
46 $file_id = $file_obj->getId();
49 }
else if(is_array(
$file) && isset(
$file[
'tmp_name']) &&
$file[
'tmp_name'] !=
"") {
79 if (! $omit_parsing) {
107 $file_name = $file_obj->getFileName();
129 return $file_obj->getTitle();
137 if ($form->getItemByPostVar(
"field_" . $this->getField()->getId())->getDeletionFlag()) {
152 if (!$record_field || !$record_field->getValue()) {
156 $file_old =
new ilObjFile($record_field->getValue(),
false);
157 $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='')
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)
cloneObject($a_target_id, $a_copy_id=null, $a_omit_tree=false)
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
Confirmation screen class.