24        $has_save_confirmation = ($this->
getRecord()->getTable()->getSaveConfirmation() && !isset(
$_GET[
'record_id']));
 
   25        $is_confirmed = (bool) (isset(
$_POST[
'save_confirmed']));
 
   27        if (is_array($file) && $file[
'tmp_name'] != 
"" && (!$has_save_confirmation || $is_confirmed)) {
 
   29            $file_obj->setType(
"file");
 
   30            $file_obj->setTitle($file[
"name"]);
 
   31            $file_obj->setFileName($file[
"name"]);
 
   33            $file_obj->setFileSize($file[
"size"]);
 
   34            $file_obj->setMode(
"object");
 
   37            if ($has_save_confirmation) {
 
   39                $file_obj->storeUnzipedFile($move_file, $file[
"name"]);
 
   41                $move_file = $file[
'tmp_name'];
 
   45                $upload = 
$DIC->upload();
 
   47                if (
false === $upload->hasBeenProcessed()) {
 
   51                if (
false === $upload->hasUploads()) {
 
   52                    throw new ilException($this->lng->txt(
'upload_error_file_not_found'));
 
   54                $file_obj->getUploadFile($move_file, $file[
"name"]);
 
   59            $file_id = $file_obj->getId();
 
   63            if (is_array($file) && isset($file[
'tmp_name']) && $file[
'tmp_name'] != 
"") {
 
  101            if ($tmp !== 
false) {
 
  104                if ($old && $old != $tmp) {
 
  126            $file_name = $file_obj->getFileName();
 
  151        return $file_obj->getTitle();
 
  161        if (
$form->getItemByPostVar(
"field_" . $this->getField()->getId())->getDeletionFlag()) {
 
  177        if (!$record_field || !$record_field->getValue()) {
 
  181        $file_old = 
new ilObjFile($record_field->getValue(), 
false);
 
  182        $file_new = $file_old->cloneObject(
null, 
null, 
true);
 
  184        $this->
setValue($file_new->getId(), 
true);
 
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
addHiddenItem($a_post_var, $a_value)
Add hidden item.
Class ilDclBaseFieldModel.
parseValue($value)
Function to parse incoming data from form input value $value.
doUpdate()
Update object in database.
loadValue()
Load the value.
static getRecordFieldCache($record, $field)
static getCloneOf($id, $type)
Class ilDclBaseFieldModel.
parseSortingValue($value, $link=true)
Returns sortable value for the specific field-types.
setValueFromForm($form)
@inheritDoc
addHiddenItemsToConfirmation(ilConfirmationGUI &$confirmation)
setValue($value, $omit_parsing=false)
Set value for record field.
parseExportValue($value)
Function to parse incoming data from form input value $value.returns the string/number/etc....
Base class for ILIAS Exception handling.
static getMimeType($a_file='', $a_filename='', $a_mime='')
static _lookupType($a_id, $a_reference=false)
lookup object type
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
if(isset($_POST['submit'])) $form