19declare(strict_types=1);
24use Sabre\DAV\Exception\Forbidden;
36 public const string FILE_NAME =
'#!_WEBDAV_INFORMATION.txt';
40 private array $duplicate_titles,
42 private array $forbidden_titles,
43 private bool $info_name_collision,
50 return $this->info_name_collision
51 || $this->duplicate_titles !== []
52 || $this->forbidden_titles !== [];
62 throw new Forbidden(
'The error info file cannot be renamed');
72 throw new Forbidden(
'The error info file is virtual and cannot be overwritten');
75 public function get():
string
79 if ($this->info_name_collision) {
80 $message .=
'# ' . $this->lang->txt(
'webdav_problem_info_duplicate') .
"\n\n";
83 if ($this->duplicate_titles !== []) {
84 $message .=
'# ' . $this->lang->txt(
'webdav_duplicate_detected_title') .
"\n";
85 foreach ($this->duplicate_titles as $title) {
86 $message .= $title .
"\n";
91 if ($this->forbidden_titles !== []) {
92 $message .=
'# ' . $this->lang->txt(
'webdav_forbidden_chars_title') .
"\n";
93 foreach ($this->forbidden_titles as $title) {
94 $message .= $title .
"\n";
99 if ($message ===
'') {
100 return $this->lang->txt(
'webdav_problem_free_container');
108 return strlen($this->
get());
121 public function delete():
void
123 throw new Forbidden(
'The error info file cannot be deleted');
Virtual text file shown in every container that lists ILIAS objects which cannot be exposed via WebDA...
__construct()
Constructor setup ILIAS global object @access public.