49 $rbacsystem = $DIC[
'rbacsystem'];
51 if (!$rbacsystem->checkAccess(
'write', SYSTEM_FOLDER_ID)) {
56 $upload_dir =
$lm_set->get(
"cont_upload_dir");
58 if (is_dir($upload_dir)
and is_readable($upload_dir)) {
73 if (!$upload_dir = self::_getUploadDirectory()) {
78 $handle = opendir($upload_dir);
80 while (
false !== ($file = readdir($handle))) {
81 $full_path = $upload_dir .
"/" . $file;
82 if (is_file($full_path)
and is_readable($full_path)) {
102 $files = self::_getUploadFiles();
104 return in_array($a_file,
$files);
119 $ilias = $DIC[
'ilias'];
121 $file = self::_getUploadDirectory() .
"/" . $a_file;
124 if (!is_file($file)) {
125 if ($a_raise_errors) {
126 $ilias->raiseError(
$lng->txt(
"upload_error_file_not_found"), $ilias->error_obj->MESSAGE);
136 if ($a_raise_errors) {
138 $lng->txt(
"file_is_infected") .
"<br />" .
140 $ilias->error_obj->MESSAGE
151 return copy($file, $a_target);
static virusHandling($a_file, $a_orig_name="", $a_clean=true)
scan file for viruses and clean files if possible
static _getUploadDirectory()
Get the directory with uploaded files.
static _getUploadFiles()
Get a list of readable files in the upload directory.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _checkUploadFile($a_file)
Check if a file exists in the upload directory and is readable.
static _copyUploadFile($a_file, $a_target, $a_raise_errors=true)
copy an uploaded file to the target directory (including virus check)