ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
ilFileSystemGUI Class Reference

File System Explorer GUI class. More...

+ Collaboration diagram for ilFileSystemGUI:

Public Member Functions

 __construct (string $main_absolute_directory)
 
 setAllowedSuffixes (array $a_suffixes)
 
 getAllowedSuffixes ()
 
 setForbiddenSuffixes (array $a_suffixes)
 
 getForbiddenSuffixes ()
 
 isValidSuffix (string $a_suffix)
 
 setAllowDirectories (bool $a_val)
 
 getAllowDirectories ()
 
 setPostDirPath (bool $a_val)
 
 getPostDirPath ()
 
 setTableId (string $a_val)
 
 getTableId ()
 
 getMainAbsoluteDir ()
 
 setTitle (string $a_val)
 
 getTitle ()
 
 setUseUploadDirectory (bool $a_val)
 
 getUseUploadDirectory ()
 
 getLastPerformedCommand ()
 
 executeCommand ()
 
 addCommand (object $a_obj, string $a_func, string $a_name, bool $a_single=true, bool $a_allow_dir=false)
 
 clearCommands ()
 
 labelFile (string $a_file, string $a_label)
 
 activateLabels (bool $a_act, string $a_label_header)
 
 setAllowDirectoryCreation (bool $a_val)
 
 getAllowDirectoryCreation ()
 
 setAllowFileCreation (bool $a_val)
 Set allowed file creation. More...
 
 getAllowFileCreation ()
 
 listFiles (?ilTable2GUI $a_table_gui=null)
 
 getTable (string $a_dir, string $a_subdir)
 
 renameFileForm (string $a_file)
 
 renameFile ()
 
 cancelRename ()
 
 createDirectory ()
 
 uploadFile ()
 
 confirmDeleteFile (array $a_files)
 
 deleteFile ()
 
 unzipFile (?string $a_file=null)
 
 downloadFile (string $a_file)
 
 getActionCommands ()
 
 defineCommands ()
 

Data Fields

const PARAMETER_CDIR = "cdir"
 
const SESSION_LAST_COMMAND = "fsys_lastcomm"
 
const PARAMETER_NEWDIR = "newdir"
 
const PARAMETER_FHSH = "fhsh"
 
const POST_PARAM_FILE = "file"
 
const PARAM_RESETOFFSET = "resetoffset"
 
const PARAM_OLD_NAME = "old_name"
 
const PARAM_UPFILE = "upfile"
 
const POST_PARAM_NEW_NAME = "new_name"
 
const POST_PARAM_NEW_DIR = "new_dir"
 
const POST_PARAM_UPLOADED_FILE = "uploaded_file"
 
const CMD_UNZIP_FILE = "unzipFile"
 

Protected Member Functions

 setPerformedCommand ($command, array $pars=[])
 
 parseCurrentDirectory ()
 
 getFileList (string $a_dir, ?string $a_subdir=null)
 
 getIncomingFiles ()
 

Protected Attributes

LegacyArchives $unzip
 
ilCtrlInterface $ctrl
 
bool $use_upload_directory = false
 
array $allowed_suffixes = []
 
array $forbidden_suffixes = []
 
ilLanguage $lng
 
string $main_absolute_dir
 
bool $post_dir_path = false
 
ilGlobalTemplateInterface $tpl
 
array $file_labels = []
 
bool $label_enable = false
 
bool $allow_directories = true
 
string $table_id = ''
 
string $title = ''
 
array $commands = []
 
string $label_header = ''
 
bool $directory_creation = false
 
bool $file_creation = false
 
WrapperFactory $wrapper
 
ILIAS Refinery Factory $refinery
 

Private Member Functions

 extCommand (int $a_nr)
 
 sanitizeCurrentDirectory ()
 

Private Attributes

Factory $ui_factory
 
Renderer $ui_renderer
 

Detailed Description

File System Explorer GUI class.

Deprecated:
Will be removed in ILIAS 10. Use ILIAS ResourceStorageService as replacement.

Definition at line 34 of file class.ilFileSystemGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilFileSystemGUI::__construct ( string  $main_absolute_directory)
Parameters
string$main_absolute_directory

Definition at line 75 of file class.ilFileSystemGUI.php.

76 {
77 global $DIC;
78
79 $this->ctrl = $DIC->ctrl();
80 $this->lng = $DIC->language();
81 $this->tpl = $DIC->ui()->mainTemplate();
82 $this->wrapper = $DIC->http()->wrapper();
83 $this->refinery = $DIC->refinery();
84 $this->main_absolute_dir = realpath($main_absolute_directory);
85 $this->ui_factory = $DIC->ui()->factory();
86 $this->ui_renderer = $DIC->ui()->renderer();
87 $this->unzip = $DIC->legacyArchives();
88
89 $this->defineCommands();
90
91 $this->ctrl->saveParameter($this, self::PARAMETER_CDIR);
92 $this->lng->loadLanguageModule("content");
93 $this->setAllowDirectories(true);
94 $this->setAllowDirectoryCreation(true);
95 $this->setAllowFileCreation(true);
96 }
setAllowFileCreation(bool $a_val)
Set allowed file creation.
setAllowDirectoryCreation(bool $a_val)
setAllowDirectories(bool $a_val)
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\ctrl(), defineCommands(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), setAllowDirectories(), setAllowDirectoryCreation(), and setAllowFileCreation().

+ Here is the call graph for this function:

Member Function Documentation

◆ activateLabels()

ilFileSystemGUI::activateLabels ( bool  $a_act,
string  $a_label_header 
)

Definition at line 268 of file class.ilFileSystemGUI.php.

268 : void
269 {
270 $this->label_enable = $a_act;
271 $this->label_header = $a_label_header;
272 }

◆ addCommand()

ilFileSystemGUI::addCommand ( object  $a_obj,
string  $a_func,
string  $a_name,
bool  $a_single = true,
bool  $a_allow_dir = false 
)

Definition at line 242 of file class.ilFileSystemGUI.php.

248 : void {
249 $i = count($this->commands);
250
251 $this->commands[$i]["object"] = $a_obj;
252 $this->commands[$i]["method"] = $a_func;
253 $this->commands[$i]["name"] = $a_name;
254 $this->commands[$i]["single"] = $a_single;
255 $this->commands[$i]["allow_dir"] = $a_allow_dir;
256 }

◆ cancelRename()

ilFileSystemGUI::cancelRename ( )

Definition at line 640 of file class.ilFileSystemGUI.php.

640 : void
641 {
642 $this->ctrl->redirect($this, "listFiles");
643 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ clearCommands()

ilFileSystemGUI::clearCommands ( )

Definition at line 258 of file class.ilFileSystemGUI.php.

258 : void
259 {
260 $this->commands = [];
261 }

◆ confirmDeleteFile()

ilFileSystemGUI::confirmDeleteFile ( array  $a_files)

Definition at line 781 of file class.ilFileSystemGUI.php.

781 : void
782 {
783 global $DIC;
784 $ilCtrl = $DIC['ilCtrl'];
785 $tpl = $DIC['tpl'];
786 $lng = $DIC['lng'];
787
788 $cgui = new ilConfirmationGUI();
789 $cgui->setFormAction($ilCtrl->getFormAction($this));
790 $cgui->setHeaderText($lng->txt("info_delete_sure"));
791 $cgui->setCancel($lng->txt("cancel"), "listFiles");
792 $cgui->setConfirm($lng->txt("delete"), "deleteFile");
793
794 foreach ($a_files as $i) {
795 $cgui->addItem("file[]", $i, $i);
796 }
797
798 $tpl->setContent($cgui->getHTML());
799 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.

References $DIC, $lng, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ createDirectory()

ilFileSystemGUI::createDirectory ( )

Definition at line 645 of file class.ilFileSystemGUI.php.

645 : void
646 {
647 global $DIC;
648 $lng = $DIC['lng'];
649
650 // determine directory
651 $cur_subdir = $this->sanitizeCurrentDirectory();
652 $cur_dir = (empty($cur_subdir))
653 ? $this->main_absolute_dir
654 : $this->main_absolute_dir . "/" . $cur_subdir;
655
656 $new_dir = $this->wrapper->post()->has(self::POST_PARAM_NEW_DIR)
657 ? $this->wrapper->post()->retrieve(self::POST_PARAM_NEW_DIR, $this->refinery->to()->string())
658 : '';
659
660 $new_dir = str_replace(".", "", ilUtil::stripSlashes($new_dir));
661 $new_dir = str_replace("/", "", $new_dir);
662
663 if (!empty($new_dir)) {
664 ilFileUtils::makeDir($cur_dir . "/" . $new_dir);
665 if (is_dir($cur_dir . "/" . $new_dir)) {
666 $this->tpl->setOnScreenMessage('success', $lng->txt("cont_dir_created"), true);
667 $this->setPerformedCommand("create_dir", ["name" => $new_dir]);
668 }
669 } else {
670 $this->tpl->setOnScreenMessage('failure', $lng->txt("cont_enter_a_dir_name"), true);
671 }
672 $this->ctrl->saveParameter($this, self::PARAMETER_CDIR);
673 $this->ctrl->redirect($this, 'listFiles');
674 }
setPerformedCommand($command, array $pars=[])
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")

References $DIC, $lng, ILIAS\Repository\ctrl(), ilFileUtils\makeDir(), ILIAS\Repository\refinery(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ defineCommands()

ilFileSystemGUI::defineCommands ( )

Definition at line 951 of file class.ilFileSystemGUI.php.

951 : void
952 {
953 $this->commands = [
954 0 => [
955 "object" => $this,
956 "method" => "downloadFile",
957 "name" => $this->lng->txt("download"),
958 "int" => true,
959 "single" => true
960 ],
961 1 => [
962 "object" => $this,
963 "method" => "confirmDeleteFile",
964 "name" => $this->lng->txt("delete"),
965 "allow_dir" => true,
966 "int" => true
967 ],
968 2 => [
969 "object" => $this,
970 "method" => self::CMD_UNZIP_FILE,
971 "name" => $this->lng->txt("unzip"),
972 "allow_dir" => true,
973 "int" => true,
974 "single" => true
975 ],
976 3 => [
977 "object" => $this,
978 "method" => "renameFileForm",
979 "name" => $this->lng->txt("rename"),
980 "allow_dir" => true,
981 "int" => true,
982 "single" => true
983 ],
984 ];
985 }
return true

References ILIAS\Repository\lng(), and true.

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteFile()

ilFileSystemGUI::deleteFile ( )

Definition at line 801 of file class.ilFileSystemGUI.php.

801 : void
802 {
803 if (!$this->wrapper->post()->has(self::POST_PARAM_FILE)) {
804 throw new LogicException($this->lng->txt("no_checkbox"));
805 }
806 $is_dir = false;
807 $post_file = null;
808
809 $postfiles = $this->wrapper->post()->retrieve(
810 self::POST_PARAM_FILE,
811 $this->refinery->to()->listOf(
812 $this->refinery->to()->string()
813 )
814 );
815 foreach ($postfiles as $post_file) {
816 if (ilUtil::stripSlashes($post_file) === "..") {
817 throw new LogicException($this->lng->txt("no_checkbox"));
818 break;
819 }
820
821 $cur_subdir = $this->sanitizeCurrentDirectory();
822 $cur_dir = (empty($cur_subdir))
823 ? $this->main_absolute_dir
824 : $this->main_absolute_dir . "/" . $cur_subdir;
825 $pi = pathinfo((string) $post_file);
826 $file = $cur_dir . "/" . ilUtil::stripSlashes($pi["basename"]);
827
828 if (is_file($file)) {
829 unlink($file);
830 }
831
832 if (is_dir($file)) {
833 $is_dir = true;
834 ilFileUtils::delDir($file);
835 }
836 }
837
838 $this->ctrl->saveParameter($this, self::PARAMETER_CDIR);
839 if ($is_dir) {
840 $this->tpl->setOnScreenMessage('success', $this->lng->txt("cont_dir_deleted"), true);
841 $this->setPerformedCommand(
842 "delete_dir",
843 ["name" => ilUtil::stripSlashes($post_file)]
844 );
845 } else {
846 $this->tpl->setOnScreenMessage('success', $this->lng->txt("cont_file_deleted"), true);
847 $this->setPerformedCommand(
848 "delete_file",
849 ["name" => ilUtil::stripSlashes($post_file)]
850 );
851 }
852 $this->ctrl->redirect($this, 'listFiles');
853 }
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively

References ILIAS\Repository\ctrl(), ilFileUtils\delDir(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ downloadFile()

ilFileSystemGUI::downloadFile ( string  $a_file)

Definition at line 931 of file class.ilFileSystemGUI.php.

931 : void
932 {
933 $file = $this->main_absolute_dir . "/" . $a_file;
934
935 if (is_file($file) && !(is_dir($file))) {
936 ilFileDelivery::deliverFileLegacy($file, basename($a_file));
937 exit;
938 }
939 $this->ctrl->saveParameter($this, self::PARAMETER_CDIR);
940 $this->ctrl->redirect($this, "listFiles");
941 }
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
exit

References ILIAS\Repository\ctrl(), ilFileDelivery\deliverFileLegacy(), and exit.

+ Here is the call graph for this function:

◆ executeCommand()

ilFileSystemGUI::executeCommand ( )

Definition at line 229 of file class.ilFileSystemGUI.php.

229 : string
230 {
231 $next_class = $this->ctrl->getNextClass($this);
232 $cmd = $this->ctrl->getCmd("listFiles");
233 if (str_starts_with((string) $cmd, "extCommand_")) {
234 $ret = $this->extCommand(substr((string) $cmd, 11, strlen((string) $cmd) - 11));
235 } else {
236 $ret = $this->$cmd();
237 }
238
239 return $ret ?? '';
240 }

References ILIAS\Repository\ctrl(), and extCommand().

+ Here is the call graph for this function:

◆ extCommand()

ilFileSystemGUI::extCommand ( int  $a_nr)
private

Definition at line 398 of file class.ilFileSystemGUI.php.

398 : string
399 {
400 $selected = $this->getIncomingFiles();
401
402 if ($selected === []) {
403 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
404 $this->ctrl->redirect($this, "listFiles");
405 }
406
407 // check if only one item is select, if command does not allow multiple selection
408 if (count($selected) > 1 && ($this->commands[$a_nr]["single"] ?? false)) {
409 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("cont_select_max_one_item"), true);
410 $this->ctrl->redirect($this, "listFiles");
411 }
412
413 $cur_subdir = $this->sanitizeCurrentDirectory();
414
415 // collect files and
416 $files = [];
417 foreach ($selected as $file) {
418 $file = ilUtil::stripSlashes($file);
419 $file = (empty($cur_subdir))
420 ? $file
421 : $cur_subdir . "/" . $file;
422
423 // check wether selected item is a directory
424 if (is_dir($this->main_absolute_dir . "/" . $file) &&
425 !$this->commands[$a_nr]["allow_dir"]) {
426 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("select_a_file"), true);
427 $this->ctrl->redirect($this, "listFiles");
428 }
429
430 $files[] = $file;
431 }
432
433 if ($this->commands[$a_nr]["single"] ?? false) {
434 $files = array_shift($files);
435 }
436
437 $obj = $this->commands[$a_nr]["object"];
438 $method = $this->commands[$a_nr]["method"];
439
440 return (string) $obj->$method($files);
441 }

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilUtil\stripSlashes().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getActionCommands()

ilFileSystemGUI::getActionCommands ( )
Returns
string[]

Definition at line 946 of file class.ilFileSystemGUI.php.

946 : array
947 {
948 return $this->commands;
949 }

◆ getAllowDirectories()

ilFileSystemGUI::getAllowDirectories ( )

Definition at line 150 of file class.ilFileSystemGUI.php.

150 : bool
151 {
153 }

References $allow_directories.

◆ getAllowDirectoryCreation()

ilFileSystemGUI::getAllowDirectoryCreation ( )

Definition at line 448 of file class.ilFileSystemGUI.php.

448 : bool
449 {
451 }

◆ getAllowedSuffixes()

ilFileSystemGUI::getAllowedSuffixes ( )
Returns
string[]

Definition at line 109 of file class.ilFileSystemGUI.php.

109 : array
110 {
112 }

References $allowed_suffixes.

Referenced by isValidSuffix().

+ Here is the caller graph for this function:

◆ getAllowFileCreation()

ilFileSystemGUI::getAllowFileCreation ( )

Definition at line 461 of file class.ilFileSystemGUI.php.

461 : bool
462 {
464 }

◆ getFileList()

ilFileSystemGUI::getFileList ( string  $a_dir,
?string  $a_subdir = null 
)
protected
Returns
array<int, array<string, mixed>>

Definition at line 327 of file class.ilFileSystemGUI.php.

327 : array
328 {
329 $items = [];
330
331 $entries = (is_dir($a_dir))
332 ? ilFileUtils::getDir($a_dir)
333 : [["type" => "dir", "entry" => ".."]];
334
335 $items = [];
336 foreach ($entries as $e) {
337 if ($e["entry"] == ".") {
338 continue;
339 }
340 if ($e["entry"] == ".." && empty($a_subdir)) {
341 continue;
342 }
343 $cfile = (empty($a_subdir))
344 ? $e["entry"]
345 : $a_subdir . "/" . $e["entry"];
346
347 $items[] = [
348 self::POST_PARAM_FILE => $cfile,
349 "entry" => $e["entry"],
350 "type" => $e["type"],
351 "size" => $e["size"] ?? 0,
352 "hash" => md5((string) $e["entry"])
353 ];
354 }
355
356 return $items;
357 }
static getDir(string $a_dir, bool $a_rec=false, ?string $a_sub_dir="")
get directory

References Vendor\Package\$e, and ilFileUtils\getDir().

+ Here is the call graph for this function:

◆ getForbiddenSuffixes()

ilFileSystemGUI::getForbiddenSuffixes ( )
Returns
string[]

Definition at line 125 of file class.ilFileSystemGUI.php.

125 : array
126 {
128 }

References $forbidden_suffixes.

Referenced by isValidSuffix().

+ Here is the caller graph for this function:

◆ getIncomingFiles()

ilFileSystemGUI::getIncomingFiles ( )
protected
Returns
string[]

Definition at line 362 of file class.ilFileSystemGUI.php.

362 : array
363 {
364 $sel_files = $hashes = [];
365 if ($this->wrapper->post()->has(self::POST_PARAM_FILE)) {
366 $hashes = $this->wrapper->post()->retrieve(
367 self::POST_PARAM_FILE,
368 $this->refinery->to()->listOf(
369 $this->refinery->to()->string()
370 )
371 );
372 } elseif ($this->wrapper->query()->has(self::PARAMETER_FHSH)) {
373 $hashes = [$this->wrapper->query()->retrieve(
374 self::PARAMETER_FHSH,
375 $this->refinery->to()->string()
376 )
377 ];
378 }
379
380 if (count($hashes) > 0) {
381 $dir = $this->parseCurrentDirectory();
382 $all_files = $this->getFileList($dir["dir"], $dir["subdir"]);
383 foreach ($hashes as $hash) {
384 foreach ($all_files as $file) {
385 if ($file["hash"] == $hash) {
386 $sel_files[] = $this->getPostDirPath()
387 ? $file[self::POST_PARAM_FILE]
388 : $file["entry"];
389 break;
390 }
391 }
392 }
393 }
394
395 return $sel_files;
396 }
getFileList(string $a_dir, ?string $a_subdir=null)

References ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ getLastPerformedCommand()

ilFileSystemGUI::getLastPerformedCommand ( )
Returns
string[]

Definition at line 219 of file class.ilFileSystemGUI.php.

219 : array
220 {
221 if (!ilSession::has(self::SESSION_LAST_COMMAND)) {
222 return [];
223 }
224 $ret = ilSession::get(self::SESSION_LAST_COMMAND);
225 ilSession::set(self::SESSION_LAST_COMMAND, null);
226 return (array) $ret;
227 }
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
static has($a_var)

References ilSession\get(), ilSession\has(), and ilSession\set().

+ Here is the call graph for this function:

◆ getMainAbsoluteDir()

ilFileSystemGUI::getMainAbsoluteDir ( )

Definition at line 175 of file class.ilFileSystemGUI.php.

175 : string
176 {
178 }

References $main_absolute_dir.

◆ getPostDirPath()

ilFileSystemGUI::getPostDirPath ( )

Definition at line 160 of file class.ilFileSystemGUI.php.

160 : bool
161 {
163 }

References $post_dir_path.

◆ getTable()

ilFileSystemGUI::getTable ( string  $a_dir,
string  $a_subdir 
)

Definition at line 525 of file class.ilFileSystemGUI.php.

526 {
527 return new ilFileSystemTableGUI(
528 $this,
529 "listFiles",
530 $a_dir,
531 $a_subdir,
532 $this->label_enable,
533 $this->file_labels,
534 $this->label_header,
535 $this->commands,
536 $this->getPostDirPath(),
537 $this->getTableId()
538 );
539 }

◆ getTableId()

ilFileSystemGUI::getTableId ( )

Definition at line 170 of file class.ilFileSystemGUI.php.

170 : string
171 {
172 return $this->table_id;
173 }

References $table_id.

◆ getTitle()

ilFileSystemGUI::getTitle ( )

Definition at line 185 of file class.ilFileSystemGUI.php.

185 : string
186 {
187 return $this->title;
188 }

References $title.

◆ getUseUploadDirectory()

ilFileSystemGUI::getUseUploadDirectory ( )

Definition at line 195 of file class.ilFileSystemGUI.php.

195 : bool
196 {
198 }

References $use_upload_directory.

◆ isValidSuffix()

ilFileSystemGUI::isValidSuffix ( string  $a_suffix)

Definition at line 130 of file class.ilFileSystemGUI.php.

130 : bool
131 {
132 if (empty($a_suffix)) {
133 return true;
134 }
135
136 if (is_array($this->getForbiddenSuffixes()) && in_array($a_suffix, $this->getForbiddenSuffixes())) {
137 return false;
138 }
139 if (is_array($this->getAllowedSuffixes()) && in_array($a_suffix, $this->getAllowedSuffixes())) {
140 return true;
141 }
142 return !is_array($this->getAllowedSuffixes()) || count($this->getAllowedSuffixes()) == 0;
143 }

References getAllowedSuffixes(), and getForbiddenSuffixes().

+ Here is the call graph for this function:

◆ labelFile()

ilFileSystemGUI::labelFile ( string  $a_file,
string  $a_label 
)

Definition at line 263 of file class.ilFileSystemGUI.php.

263 : void
264 {
265 $this->file_labels[$a_file][] = $a_label;
266 }

◆ listFiles()

ilFileSystemGUI::listFiles ( ?ilTable2GUI  $a_table_gui = null)

Definition at line 466 of file class.ilFileSystemGUI.php.

466 : void
467 {
468 global $DIC;
469 $ilToolbar = $DIC['ilToolbar'];
470 $lng = $DIC['lng'];
471 $ilCtrl = $DIC['ilCtrl'];
472
473 $dir = $this->parseCurrentDirectory();
474
475 $this->ctrl->setParameter($this, self::PARAMETER_CDIR, $dir["subdir"]);
476
477 // toolbar for adding files/directories
478 $ilToolbar->setFormAction($ilCtrl->getFormAction($this), true);
479
480 if ($this->getAllowDirectories() && $this->getAllowDirectoryCreation()) {
481 $ti = new ilTextInputGUI($this->lng->txt("cont_new_dir"), self::POST_PARAM_NEW_DIR);
482 $ti->setMaxLength(80);
483 $ti->setSize(10);
484 $ilToolbar->addInputItem($ti, true);
485 $ilToolbar->addFormButton($lng->txt("create"), "createDirectory");
486
487 $ilToolbar->addSeparator();
488 }
489 if ($this->getAllowFileCreation()) {
490 $fi = new ilFileInputGUI($this->lng->txt("cont_new_file"), "new_file");
491 $fi->setSize(10);
492 $ilToolbar->addInputItem($fi, true);
493 $ilToolbar->addFormButton($lng->txt("upload"), "uploadFile");
494 }
496 $ilToolbar->addSeparator();
498 $options[""] = $lng->txt("cont_select_from_upload_dir");
499 foreach ($files as $file) {
500 $file = htmlspecialchars($file, ENT_QUOTES, "utf-8");
501 $options[$file] = $file;
502 }
503 $si = new ilSelectInputGUI($this->lng->txt("cont_uploaded_file"), self::POST_PARAM_UPLOADED_FILE);
504 $si->setOptions($options);
505 $ilToolbar->addInputItem($si, true);
506 $ilToolbar->addFormButton($lng->txt("copy"), "uploadFile");
507 }
508
509 $fs_table = $this->getTable($dir["dir"], $dir["subdir"]);
510
511 if ($this->getTitle() !== "") {
512 $fs_table->setTitle($this->getTitle());
513 }
514 if (
515 $this->wrapper->query()->has(self::PARAM_RESETOFFSET)
516 && $this->wrapper->query()->retrieve(
517 self::PARAM_RESETOFFSET,
518 $this->refinery->kindlyTo()->int()
519 ) == 1) {
520 $fs_table->resetOffset();
521 }
522 $this->tpl->setContent($fs_table->getHTML());
523 }
This class represents a file property in a property form.
getTable(string $a_dir, string $a_subdir)
This class represents a selection list property in a property form.
This class represents a text property in a property form.
static _getUploadDirectory()

References $DIC, $lng, ILIAS\UI\Implementation\Component\Input\Field\$options, ilUploadFiles\_getUploadDirectory(), ilUploadFiles\_getUploadFiles(), ILIAS\Repository\ctrl(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ parseCurrentDirectory()

ilFileSystemGUI::parseCurrentDirectory ( )
protected
Returns
array<string, mixed>

Definition at line 277 of file class.ilFileSystemGUI.php.

277 : array
278 {
279 // determine directory
280 // FIXME: I have to call stripSlashes here twice, because I could not
281 // determine where the second layer of slashes is added to the
282 // URL Parameter
283
284 $cur_subdir = $this->wrapper->query()->has(self::PARAMETER_CDIR)
285 ? $this->wrapper->query()->retrieve(self::PARAMETER_CDIR, $this->refinery->to()->string())
286 : '';
287
288 $new_subdir = $this->wrapper->query()->has(self::PARAMETER_NEWDIR)
289 ? $this->wrapper->query()->retrieve(self::PARAMETER_NEWDIR, $this->refinery->to()->string())
290 : '';
291
292 $cur_subdir = ilUtil::stripSlashes(ilUtil::stripSlashes($cur_subdir));
293 $new_subdir = ilUtil::stripSlashes(ilUtil::stripSlashes($new_subdir));
294
295 if ($new_subdir === "..") {
296 $cur_subdir = substr($cur_subdir, 0, strrpos($cur_subdir, "/"));
297 } elseif (!empty($new_subdir)) {
298 $cur_subdir = empty($cur_subdir) ? $new_subdir : $cur_subdir . "/" . $new_subdir;
299 }
300
301 $cur_subdir = str_replace("..", "", $cur_subdir);
302 $cur_dir = (empty($cur_subdir))
303 ? $this->main_absolute_dir
304 : $this->main_absolute_dir . "/" . $cur_subdir;
305
306 $resolved_dir = realpath($cur_dir);
307 if ($resolved_dir === false) {
308 // The requested directory cannot be resolved, e.g. because its
309 // name contains non-UTF-8/special characters created by an older
310 // ILIAS version (Mantis 45045). Fall back to the managed base
311 // directory instead of crashing the whole page.
312 return [
314 "subdir" => ''
315 ];
316 }
317
318 return [
319 "dir" => $resolved_dir,
320 "subdir" => $cur_subdir
321 ];
322 }

References ILIAS\Repository\refinery(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ renameFile()

ilFileSystemGUI::renameFile ( )

Definition at line 571 of file class.ilFileSystemGUI.php.

571 : void
572 {
573 $new_name = $this->wrapper->post()->has(self::POST_PARAM_NEW_NAME)
574 ? $this->wrapper->post()->retrieve(self::POST_PARAM_NEW_NAME, $this->refinery->to()->string())
575 : '';
576
577 $new_name = str_replace("..", "", ilUtil::stripSlashes($new_name));
578 $new_name = str_replace("/", "", $new_name);
579 if ($new_name === "") {
580 throw new LogicException($this->lng->txt("enter_new_name"));
581 }
582
583 $pi = pathinfo($new_name);
584 $suffix = $pi["extension"] ?? "";
585 if ($suffix != "" && !$this->isValidSuffix($suffix)) {
586 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("file_no_valid_file_type") . " ($suffix)", true);
587 $this->ctrl->redirect($this, "listFiles");
588 }
589
590 $cur_subdir = $this->sanitizeCurrentDirectory();
591 $dir = (empty($cur_subdir))
592 ? $this->main_absolute_dir . "/"
593 : $this->main_absolute_dir . "/" . $cur_subdir . "/";
594
595 $old_name = $this->wrapper->query()->has(self::PARAM_OLD_NAME)
596 ? $this->wrapper->query()->retrieve(self::PARAM_OLD_NAME, $this->refinery->to()->string())
597 : null;
598
599 // check if this path is inside $dir
600 $old_name = ilUtil::stripSlashes($old_name);
601 $realpath = realpath($dir . $old_name);
602 if (!str_starts_with($realpath, realpath($dir))) {
603 throw new ilException($this->lng->txt("no_permission"));
604 }
605
606 if (is_dir($dir . $old_name)) {
607 rename($dir . $old_name, $dir . $new_name);
608 } else {
609 try {
610 ilFileUtils::rename($dir . $old_name, $dir . $new_name);
611 } catch (ilException $e) {
612 $this->tpl->setOnScreenMessage('failure', $e->getMessage(), true);
613 $this->ctrl->redirect($this, "listFiles");
614 }
615 }
616
617 ilFileUtils::renameExecutables($this->main_absolute_dir);
618 if (is_dir($dir . $new_name)) {
619 $this->tpl->setOnScreenMessage(
620 'success',
621 $this->lng->txt("cont_dir_renamed"),
622 true
623 );
624 $this->setPerformedCommand("rename_dir", [self::PARAM_OLD_NAME => $old_name,
625 self::POST_PARAM_NEW_NAME => $new_name
626 ]);
627 } else {
628 $this->tpl->setOnScreenMessage(
629 'success',
630 $this->lng->txt("cont_file_renamed"),
631 true
632 );
633 $this->setPerformedCommand("rename_file", [self::PARAM_OLD_NAME => $old_name,
634 self::POST_PARAM_NEW_NAME => $new_name
635 ]);
636 }
637 $this->ctrl->redirect($this, "listFiles");
638 }
Base class for ILIAS Exception handling.
isValidSuffix(string $a_suffix)
static rename(string $a_source, string $a_target)
static renameExecutables(string $a_dir)

References Vendor\Package\$e, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ilFileUtils\rename(), ilFileUtils\renameExecutables(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ renameFileForm()

ilFileSystemGUI::renameFileForm ( string  $a_file)

Definition at line 541 of file class.ilFileSystemGUI.php.

541 : void
542 {
543 $cur_subdir = $this->sanitizeCurrentDirectory();
544 $file = $this->main_absolute_dir . "/" . $a_file;
545
546 $this->ctrl->setParameter($this, self::PARAM_OLD_NAME, basename($a_file));
547 $this->ctrl->saveParameter($this, self::PARAMETER_CDIR);
548 $form = new ilPropertyFormGUI();
549
550 // file/dir name
551 $ti = new ilTextInputGUI($this->lng->txt("name"), self::POST_PARAM_NEW_NAME);
552 $ti->setMaxLength(200);
553 $ti->setSize(40);
554 $ti->setValue(basename($a_file));
555 $form->addItem($ti);
556
557 // save and cancel commands
558 $form->addCommandButton("renameFile", $this->lng->txt("rename"));
559 $form->addCommandButton("cancelRename", $this->lng->txt("cancel"));
560 $form->setFormAction($this->ctrl->getFormAction($this, "renameFile"));
561
562 if (is_dir($file)) {
563 $form->setTitle($this->lng->txt("cont_rename_dir"));
564 } else {
565 $form->setTitle($this->lng->txt("rename_file"));
566 }
567
568 $this->tpl->setContent($form->getHTML());
569 }
This class represents a property form user interface.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ sanitizeCurrentDirectory()

ilFileSystemGUI::sanitizeCurrentDirectory ( )
private

Definition at line 987 of file class.ilFileSystemGUI.php.

987 : string
988 {
989 $cur_subdir = $this->wrapper->query()->has(self::PARAMETER_CDIR)
990 ? $this->wrapper->query()->retrieve(self::PARAMETER_CDIR, $this->refinery->to()->string())
991 : '';
992
993 return str_replace(
994 "..",
995 "",
996 ilUtil::stripSlashes($cur_subdir)
997 );
998 }

References ILIAS\Repository\refinery(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setAllowDirectories()

ilFileSystemGUI::setAllowDirectories ( bool  $a_val)

Definition at line 145 of file class.ilFileSystemGUI.php.

145 : void
146 {
147 $this->allow_directories = $a_val;
148 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setAllowDirectoryCreation()

ilFileSystemGUI::setAllowDirectoryCreation ( bool  $a_val)

Definition at line 443 of file class.ilFileSystemGUI.php.

443 : void
444 {
445 $this->directory_creation = $a_val;
446 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setAllowedSuffixes()

ilFileSystemGUI::setAllowedSuffixes ( array  $a_suffixes)
Parameters
string[]$a_suffixes

Definition at line 101 of file class.ilFileSystemGUI.php.

101 : void
102 {
103 $this->allowed_suffixes = $a_suffixes;
104 }

◆ setAllowFileCreation()

ilFileSystemGUI::setAllowFileCreation ( bool  $a_val)

Set allowed file creation.

Definition at line 456 of file class.ilFileSystemGUI.php.

456 : void
457 {
458 $this->file_creation = $a_val;
459 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setForbiddenSuffixes()

ilFileSystemGUI::setForbiddenSuffixes ( array  $a_suffixes)
Parameters
string[]$a_suffixes

Definition at line 117 of file class.ilFileSystemGUI.php.

117 : void
118 {
119 $this->forbidden_suffixes = $a_suffixes;
120 }

◆ setPerformedCommand()

ilFileSystemGUI::setPerformedCommand (   $command,
array  $pars = [] 
)
protected
Parameters
array | string$command
array$pars
Returns
void

Definition at line 205 of file class.ilFileSystemGUI.php.

205 : void
206 {
207 if (!is_array($pars)) {
208 $pars = [];
209 }
210 ilSession::set(self::SESSION_LAST_COMMAND, array_merge(
211 ["cmd" => $command],
212 $pars
213 ));
214 }

References ilSession\set().

+ Here is the call graph for this function:

◆ setPostDirPath()

ilFileSystemGUI::setPostDirPath ( bool  $a_val)

Definition at line 155 of file class.ilFileSystemGUI.php.

155 : void
156 {
157 $this->post_dir_path = $a_val;
158 }

◆ setTableId()

ilFileSystemGUI::setTableId ( string  $a_val)

Definition at line 165 of file class.ilFileSystemGUI.php.

165 : void
166 {
167 $this->table_id = $a_val;
168 }

◆ setTitle()

ilFileSystemGUI::setTitle ( string  $a_val)

Definition at line 180 of file class.ilFileSystemGUI.php.

180 : void
181 {
182 $this->title = $a_val;
183 }

◆ setUseUploadDirectory()

ilFileSystemGUI::setUseUploadDirectory ( bool  $a_val)

Definition at line 190 of file class.ilFileSystemGUI.php.

190 : void
191 {
192 $this->use_upload_directory = $a_val;
193 }

◆ unzipFile()

ilFileSystemGUI::unzipFile ( ?string  $a_file = null)

Definition at line 855 of file class.ilFileSystemGUI.php.

855 : void
856 {
857 // #17470 - direct unzip call (after upload)
858 $upname = $this->wrapper->query()->has(self::PARAM_UPFILE)
859 ? $this->wrapper->query()->retrieve(self::PARAM_UPFILE, $this->refinery->to()->string())
860 : null;
861 if (is_null($a_file) && $upname !== null) {
862 $a_file = basename((string) $upname);
863 }
864
865 $cur_subdir = $this->sanitizeCurrentDirectory();
866 $cur_dir = (empty($cur_subdir))
867 ? $this->main_absolute_dir
868 : $this->main_absolute_dir . "/" . $cur_subdir;
869 $a_file = $this->main_absolute_dir . "/" . $a_file;
870
871 if (is_file($a_file)) {
872 $cur_files = array_keys(ilFileUtils::getDir($cur_dir));
873 $cur_files_r = iterator_to_array(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($cur_dir)));
874
875 $this->unzip->unzip(
876 $a_file,
877 null,
878 true,
879 !$this->getAllowDirectories(),
880 false
881 );
882
883 $new_files = array_keys(ilFileUtils::getDir($cur_dir));
884 $new_files_r = iterator_to_array(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($cur_dir)));
885
886 $diff = array_diff($new_files, $cur_files);
887 $diff_r = array_diff($new_files_r, $cur_files_r);
888
889 // unlink forbidden file types
890 foreach (array_keys($diff_r) as $f) {
891 $pi = pathinfo($f);
892 if (!is_dir($f) && !$this->isValidSuffix(strtolower($pi["extension"] ?? ''))) {
893 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("file_some_invalid_file_types_removed") . " (" . $pi["extension"] . ")", true);
894 unlink($f);
895 }
896 }
897
898 if ($diff !== []) {
899 if ($this->getAllowDirectories()) {
900 $new_files = [];
901
902 foreach ($diff as $new_item) {
903 if (is_dir($cur_dir . "/" . $new_item)) {
904 ilFileUtils::recursive_dirscan($cur_dir . "/" . $new_item, $new_files);
905 }
906 }
907
908 if (isset($new_files["path"])) {
909 foreach ($new_files["path"] as $idx => $path) {
910 $path = substr((string) $path, strlen($this->main_absolute_dir) + 1);
911 $diff[] = $path . $new_files[self::POST_PARAM_FILE][$idx];
912 }
913 }
914 }
915
916 $this->setPerformedCommand(
917 "unzip_file",
918 ["added" => $diff
919 ]
920 );
921 }
922 }
923
924 ilFileUtils::renameExecutables($this->main_absolute_dir);
925
926 $this->ctrl->saveParameter($this, self::PARAMETER_CDIR);
927 $this->tpl->setOnScreenMessage('success', $this->lng->txt("cont_file_unzipped"), true);
928 $this->ctrl->redirect($this, "listFiles");
929 }
static recursive_dirscan(string $dir, array &$arr)
Recursively scans a given directory and writes path and filename into referenced array.
$path
Definition: ltiservices.php:30

References Vendor\Package\$f, $path, ILIAS\Repository\ctrl(), ilFileUtils\getDir(), ILIAS\Repository\lng(), ilFileUtils\recursive_dirscan(), ILIAS\Repository\refinery(), and ilFileUtils\renameExecutables().

+ Here is the call graph for this function:

◆ uploadFile()

ilFileSystemGUI::uploadFile ( )

Definition at line 676 of file class.ilFileSystemGUI.php.

676 : void
677 {
678 global $DIC;
679 $lng = $DIC['lng'];
680
681 // determine directory
682 $cur_subdir = $this->sanitizeCurrentDirectory();
683 $cur_dir = (empty($cur_subdir))
684 ? $this->main_absolute_dir
685 : $this->main_absolute_dir . "/" . $cur_subdir;
686
687 $tgt_file = null;
688
689 $pi = pathinfo((string) $_FILES["new_file"]["name"]);
690 $suffix = $pi["extension"] ?? "";
691 if (!$this->isValidSuffix($suffix)) {
692 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("file_no_valid_file_type") . " ($suffix)", true);
693 $this->ctrl->redirect($this, "listFiles");
694 }
695
696 $uploaded_file = $this->wrapper->post()->has(self::POST_PARAM_UPLOADED_FILE)
697 ? $this->wrapper->post()->retrieve(self::POST_PARAM_UPLOADED_FILE, $this->refinery->to()->string())
698 : '';
699 if (is_file($_FILES["new_file"]["tmp_name"])) {
700 $name = $this->secure(ilUtil::stripSlashes($_FILES["new_file"]["name"]));
701 $tgt_file = $cur_dir . "/" . $name;
702
703 // use filesystem directly
704 //ilFileUtils::moveUploadedFile(, $name, $tgt_file);
705 $upload = $DIC->upload();
706
707 // If the upload has not yet been processed make sure he gets processed now.
708 if (!$upload->hasBeenProcessed()) {
709 $upload->process();
710 }
711
712
713 if (!$upload->hasUploads()) {
714 throw new ilException(
715 $DIC->language()->txt("upload_error_file_not_found")
716 );
717 }
718 $upload_result = $upload->getResults()[$_FILES["new_file"]["tmp_name"]];
719 if ($upload_result instanceof UploadResult) {
720 $processing_status = $upload_result->getStatus();
721 if ($processing_status->getCode() === ProcessingStatus::REJECTED) {
722 $this->tpl->setOnScreenMessage(
723 'failure',
724 $processing_status->getMessage(),
725 true
726 );
727 $this->ctrl->redirect($this, "listFiles");
728 }
729 }
730
731 $upload->moveOneFileTo(
732 $upload_result,
733 LegacyPathHelper::createRelativePath($cur_dir . "/"),
734 LegacyPathHelper::deriveLocationFrom($cur_dir),
735 $name,
736 true
737 );
738 // end upload
739 } elseif ($uploaded_file) {
740 // check if the file is in the ftp directory and readable
741 if (ilUploadFiles::_checkUploadFile($uploaded_file)) {
742 $tgt_file = $cur_dir . "/" . ilUtil::stripSlashes($uploaded_file);
743
744 // copy uploaded file to data directory
745 ilUploadFiles::_copyUploadFile($uploaded_file, $tgt_file);
746 }
747 } elseif (trim((string) $_FILES["new_file"]["name"]) === "") {
748 $this->tpl->setOnScreenMessage('failure', $lng->txt("cont_enter_a_file"), true);
749 }
750
751 if ($tgt_file && is_file($tgt_file)) {
752 $unzip = null;
753 if (MimeType::getMimeType($tgt_file) === "application/zip") {
754 $this->ctrl->setParameter($this, self::PARAM_UPFILE, basename($tgt_file));
755 $url = $this->ctrl->getLinkTarget($this, self::CMD_UNZIP_FILE);
756 $this->ctrl->setParameter($this, self::PARAM_UPFILE, "");
757
758 $unzip_link = $this->ui_factory->link()->standard(
759 $this->lng->txt("unzip"),
760 $url
761 );
762
763 $unzip = " " . $this->ui_renderer->render($unzip_link);
764 }
765
766 $this->tpl->setOnScreenMessage('success', $lng->txt("cont_file_created") . $unzip, true);
767
768 $this->setPerformedCommand(
769 "create_file",
770 ["name" => substr($tgt_file, strlen($this->main_absolute_dir) + 1)]
771 );
772 }
773
774 $this->ctrl->saveParameter($this, self::PARAMETER_CDIR);
775
776 ilFileUtils::renameExecutables($this->main_absolute_dir);
777
778 $this->ctrl->redirect($this, 'listFiles');
779 }
static _copyUploadFile(string $a_file, string $a_target, bool $a_raise_errors=true)
static _checkUploadFile(string $a_file)
$url
Definition: shib_logout.php:70

References $DIC, $lng, $url, ilUploadFiles\_checkUploadFile(), ilUploadFiles\_copyUploadFile(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ilFileUtils\renameExecutables(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

Field Documentation

◆ $allow_directories

bool ilFileSystemGUI::$allow_directories = true
protected

Definition at line 62 of file class.ilFileSystemGUI.php.

Referenced by getAllowDirectories().

◆ $allowed_suffixes

array ilFileSystemGUI::$allowed_suffixes = []
protected

Definition at line 54 of file class.ilFileSystemGUI.php.

Referenced by getAllowedSuffixes().

◆ $commands

array ilFileSystemGUI::$commands = []
protected

Definition at line 65 of file class.ilFileSystemGUI.php.

◆ $ctrl

ilCtrlInterface ilFileSystemGUI::$ctrl
protected

Definition at line 52 of file class.ilFileSystemGUI.php.

◆ $directory_creation

bool ilFileSystemGUI::$directory_creation = false
protected

Definition at line 67 of file class.ilFileSystemGUI.php.

◆ $file_creation

bool ilFileSystemGUI::$file_creation = false
protected

Definition at line 68 of file class.ilFileSystemGUI.php.

◆ $file_labels

array ilFileSystemGUI::$file_labels = []
protected

Definition at line 60 of file class.ilFileSystemGUI.php.

◆ $forbidden_suffixes

array ilFileSystemGUI::$forbidden_suffixes = []
protected

Definition at line 55 of file class.ilFileSystemGUI.php.

Referenced by getForbiddenSuffixes().

◆ $label_enable

bool ilFileSystemGUI::$label_enable = false
protected

Definition at line 61 of file class.ilFileSystemGUI.php.

◆ $label_header

string ilFileSystemGUI::$label_header = ''
protected

Definition at line 66 of file class.ilFileSystemGUI.php.

◆ $lng

ilLanguage ilFileSystemGUI::$lng
protected

Definition at line 56 of file class.ilFileSystemGUI.php.

◆ $main_absolute_dir

string ilFileSystemGUI::$main_absolute_dir
protected

Definition at line 57 of file class.ilFileSystemGUI.php.

Referenced by getMainAbsoluteDir().

◆ $post_dir_path

bool ilFileSystemGUI::$post_dir_path = false
protected

Definition at line 58 of file class.ilFileSystemGUI.php.

Referenced by getPostDirPath().

◆ $refinery

ILIAS Refinery Factory ilFileSystemGUI::$refinery
protected

Definition at line 70 of file class.ilFileSystemGUI.php.

◆ $table_id

string ilFileSystemGUI::$table_id = ''
protected

Definition at line 63 of file class.ilFileSystemGUI.php.

Referenced by getTableId().

◆ $title

string ilFileSystemGUI::$title = ''
protected

Definition at line 64 of file class.ilFileSystemGUI.php.

Referenced by getTitle().

◆ $tpl

ilGlobalTemplateInterface ilFileSystemGUI::$tpl
protected

Definition at line 59 of file class.ilFileSystemGUI.php.

◆ $ui_factory

Factory ilFileSystemGUI::$ui_factory
private

Definition at line 49 of file class.ilFileSystemGUI.php.

◆ $ui_renderer

Renderer ilFileSystemGUI::$ui_renderer
private

Definition at line 50 of file class.ilFileSystemGUI.php.

◆ $unzip

LegacyArchives ilFileSystemGUI::$unzip
protected

Definition at line 51 of file class.ilFileSystemGUI.php.

◆ $use_upload_directory

bool ilFileSystemGUI::$use_upload_directory = false
protected

Definition at line 53 of file class.ilFileSystemGUI.php.

Referenced by getUseUploadDirectory().

◆ $wrapper

WrapperFactory ilFileSystemGUI::$wrapper
protected

Definition at line 69 of file class.ilFileSystemGUI.php.

◆ CMD_UNZIP_FILE

const ilFileSystemGUI::CMD_UNZIP_FILE = "unzipFile"

Definition at line 48 of file class.ilFileSystemGUI.php.

Referenced by ilFileSystemTableGUI\fillRow().

◆ PARAM_OLD_NAME

const ilFileSystemGUI::PARAM_OLD_NAME = "old_name"

Definition at line 43 of file class.ilFileSystemGUI.php.

◆ PARAM_RESETOFFSET

const ilFileSystemGUI::PARAM_RESETOFFSET = "resetoffset"

Definition at line 42 of file class.ilFileSystemGUI.php.

◆ PARAM_UPFILE

const ilFileSystemGUI::PARAM_UPFILE = "upfile"

Definition at line 44 of file class.ilFileSystemGUI.php.

◆ PARAMETER_CDIR

const ilFileSystemGUI::PARAMETER_CDIR = "cdir"

Definition at line 37 of file class.ilFileSystemGUI.php.

◆ PARAMETER_FHSH

const ilFileSystemGUI::PARAMETER_FHSH = "fhsh"

Definition at line 40 of file class.ilFileSystemGUI.php.

◆ PARAMETER_NEWDIR

const ilFileSystemGUI::PARAMETER_NEWDIR = "newdir"

Definition at line 39 of file class.ilFileSystemGUI.php.

◆ POST_PARAM_FILE

const ilFileSystemGUI::POST_PARAM_FILE = "file"

Definition at line 41 of file class.ilFileSystemGUI.php.

◆ POST_PARAM_NEW_DIR

const ilFileSystemGUI::POST_PARAM_NEW_DIR = "new_dir"

Definition at line 46 of file class.ilFileSystemGUI.php.

◆ POST_PARAM_NEW_NAME

const ilFileSystemGUI::POST_PARAM_NEW_NAME = "new_name"

Definition at line 45 of file class.ilFileSystemGUI.php.

◆ POST_PARAM_UPLOADED_FILE

const ilFileSystemGUI::POST_PARAM_UPLOADED_FILE = "uploaded_file"

Definition at line 47 of file class.ilFileSystemGUI.php.

◆ SESSION_LAST_COMMAND

const ilFileSystemGUI::SESSION_LAST_COMMAND = "fsys_lastcomm"

Definition at line 38 of file class.ilFileSystemGUI.php.


The documentation for this class was generated from the following file: