19 declare(strict_types=1);
43 $general_settings =
new General();
44 $this->convert_to_ascii = $general_settings->isDownloadWithAsciiFileName();
46 $this->white_list_default = include __DIR__ .
"/../defaults/default_whitelist.php";
53 $r = $this->db->query(
54 "SELECT ref_id FROM object_reference JOIN object_data ON object_reference.obj_id = object_data.obj_id WHERE object_data.type = 'facs';" 56 $r = $this->db->fetchObject(
$r);
57 return (
int) (
$r->ref_id ?? 0);
63 return $DIC->isDependencyAvailable(
'rbac')
64 && isset($DIC[
"rbacsystem"])
65 && $DIC->rbac()->system()->checkAccess(
66 'upload_blacklisted_files',
67 $this->file_admin_ref_id
73 if ($this->bypass !==
null) {
79 private function read(): void
96 explode(
",", $this->
settings->get(
"suffix_repl_additional") ??
'')
101 explode(
",", $this->
settings->get(
"suffix_custom_white_list") ??
'')
104 $this->white_list_overall = array_merge($this->white_list_default, $this->white_list_positive);
105 $this->white_list_overall = array_diff($this->white_list_overall, $this->white_list_negative);
106 $this->white_list_overall = array_diff($this->white_list_overall, $this->black_list_overall);
107 $this->white_list_overall[] =
'';
108 $this->white_list_overall = array_unique($this->white_list_overall);
109 $this->white_list_overall = array_diff($this->white_list_overall, $this->black_list_prohibited);
116 $this->black_list_prohibited =
array_map(
118 explode(
",", $this->
settings->get(
"suffix_custom_expl_black") ??
'')
121 $this->black_list_prohibited = array_filter($this->black_list_prohibited, fn($item):
bool => $item !==
'');
127 return fn(
string $suffix):
string => trim(strtolower($suffix));
array $white_list_negative
determineFileAdminRefId()
array $black_list_prohibited
__construct(private ilSetting $settings, ilIniFile $client_ini, private ilDBInterface $db)
array $white_list_positive
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
array $white_list_overall
isByPassAllowedForCurrentUser()
array $white_list_default
array $black_list_overall
isASCIIConvertionEnabled()