ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilFileSystemGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
13 {
14  var $ctrl;
15 
16  protected $use_upload_directory = false;
17 
18  function ilFileSystemGUI($a_main_directory)
19  {
20  global $lng, $ilCtrl, $tpl, $ilias;
21 
22  $this->ctrl =& $ilCtrl;
23  $this->lng =& $lng;
24  $this->ilias =& $ilias;
25  $this->tpl =& $tpl;
26  $this->main_dir = $a_main_directory;
27  $this->post_dir_path = false;
28  $this->commands = array(
29  0 => array(
30  "object" => $this,
31  "method" => "downloadFile",
32  "name" => $lng->txt("download"),
33  "int" => true
34  ),
35  1 => array(
36  "object" => $this,
37  "method" => "confirmDeleteFile",
38  "name" => $lng->txt("delete"),
39  "allow_dir" => true,
40  "int" => true
41  ),
42  2 => array(
43  "object" => $this,
44  "method" => "unzipFile",
45  "name" => $lng->txt("unzip"),
46  "int" => true
47  ),
48  3 => array(
49  "object" => $this,
50  "method" => "renameFileForm",
51  "name" => $lng->txt("rename"),
52  "allow_dir" => true,
53  "int" => true
54  ),
55  );
56 
57  $this->file_labels = array();
58  $this->label_enable = false;
59  $this->ctrl->saveParameter($this, "cdir");
60  $lng->loadLanguageModule("content");
61  $this->setAllowDirectories(true);
62  $this->setAllowDirectoryCreation(true);
63  $this->setAllowFileCreation(true);
64 //echo "<br>main_dir:".$this->main_dir.":";
65  }
66 
72  function setAllowDirectories($a_val)
73  {
74  $this->allow_directories = $a_val;
75  }
76 
83  {
84  return $this->allow_directories;
85  }
86 
92  function setPostDirPath($a_val)
93  {
94  $this->post_dir_path = $a_val;
95  }
96 
102  function getPostDirPath()
103  {
104  return $this->post_dir_path;
105  }
106 
112  function setTableId($a_val)
113  {
114  $this->table_id = $a_val;
115  }
116 
122  function getTableId()
123  {
124  return $this->table_id;
125  }
126 
132  function setTitle($a_val)
133  {
134  $this->title = $a_val;
135  }
136 
142  function getTitle()
143  {
144  return $this->title;
145  }
146 
152  function setUseUploadDirectory($a_val)
153  {
154  $this->use_upload_directory = $a_val;
155  }
156 
163  {
165  }
166 
173  protected function setPerformedCommand($command, $pars = "")
174  {
175  if (!is_array($pars))
176  {
177  $pars = array();
178  }
179  $_SESSION["fsys"]["lastcomm"] = array_merge(
180  array("cmd" => $command), $pars);
181  }
182 
188  public function getLastPerformedCommand()
189  {
190  $ret = $_SESSION["fsys"]["lastcomm"];
191  $_SESSION["fsys"]["lastcomm"] = "none";
192  return $ret;
193  }
194 
198  function &executeCommand()
199  {
200  $next_class = $this->ctrl->getNextClass($this);
201  $cmd = $this->ctrl->getCmd("listFiles");
202 
203  switch($next_class)
204  {
205 
206  default:
207  if (substr($cmd, 0, 11) == "extCommand_")
208  {
209  $ret =& $this->extCommand(substr($cmd, 11, strlen($cmd) - 11));
210  }
211  else
212  {
213  $ret =& $this->$cmd();
214  }
215  break;
216  }
217 
218  return $ret;
219  }
220 
221 
225  function addCommand(&$a_obj, $a_func, $a_name, $a_single = true,
226  $a_allow_dir = false)
227  {
228  $i = count($this->commands);
229 
230  $this->commands[$i]["object"] =& $a_obj;
231  $this->commands[$i]["method"] = $a_func;
232  $this->commands[$i]["name"] = $a_name;
233  $this->commands[$i]["single"] = $a_single;
234  $this->commands[$i]["allow_dir"] = $a_allow_dir;
235 
236  //$this->commands[] = $arr;
237  }
238 
242  function clearCommands()
243  {
244  $this->commands = array();
245  }
246 
250  function labelFile($a_file, $a_label)
251  {
252  $this->file_labels[$a_file][] = $a_label;
253  }
254 
258  function activateLabels($a_act, $a_label_header)
259  {
260  $this->label_enable = $a_act;
261  $this->label_header = $a_label_header;
262  }
263 
267  function &extCommand($a_nr)
268  {
269  if (isset($_POST["file"]))
270  {
271  // remove ".." items
272  foreach ($_POST["file"] as $k => $v)
273  {
274  if ($_POST["file"][$k] == "..")
275  {
276  unset($_POST["file"][$k]);
277  }
278  }
279  }
280  // check if at least one item is select
281  else
282  {
283  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
284  }
285 
286  // check if only one item is select, if command does not allow multiple selection
287  if (count($_POST["file"]) > 1 && $this->commands[$a_nr]["single"])
288  {
289  $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
290  }
291 
292  $cur_subdir = str_replace(".", "", ilUtil::stripSlashes($_GET["cdir"]));
293 
294  // collect files and
295  $files = array();
296  foreach ($_POST["file"] as $k => $v)
297  {
298  $file = (!empty($cur_subdir))
299  ? $this->main_dir."/".$cur_subdir."/".ilUtil::stripSlashes($_POST["file"][$k])
300  : $this->main_dir."/".ilUtil::stripSlashes($_POST["file"][$k]);
301 
302  // check wether selected item is a directory
303  if (@is_dir($file) && !$this->commands[$a_nr]["allow_dir"])
304  {
305  $this->ilias->raiseError($this->lng->txt("select_a_file"),$this->ilias->error_obj->MESSAGE);
306  }
307  $file = (!empty($cur_subdir))
308  ? $cur_subdir."/".ilUtil::stripSlashes($_POST["file"][$k])
309  : ilUtil::stripSlashes($_POST["file"][$k]);
310  $files[] = $file;
311  }
312 
313  if ($this->commands[$a_nr]["single"])
314  {
315  $files = $files[0];
316  }
317 
318  $obj =& $this->commands[$a_nr]["object"];
319  $method = $this->commands[$a_nr]["method"];
320 
321  return $obj->$method($files);
322  }
323 
327  public function setAllowDirectoryCreation($a_val)
328  {
329  $this->directory_creation = $a_val;
330  }
331 
335  public function getAllowDirectoryCreation()
336  {
337  return $this->directory_creation;
338  }
339 
343  public function setAllowFileCreation($a_val)
344  {
345  $this->file_creation = $a_val;
346  }
347 
351  public function getAllowFileCreation()
352  {
353  return $this->file_creation;
354  }
355 
359  function listFiles()
360  {
361  global $ilToolbar, $lng, $ilCtrl;
362 
363 
364  // determine directory
365  // FIXME: I have to call stripSlashes here twice, because I could not
366  // determine where the second layer of slashes is added to the
367  // URL Parameter
368  $cur_subdir = ilUtil::stripSlashes(ilUtil::stripSlashes($_GET["cdir"]));
369  $new_subdir = ilUtil::stripSlashes(ilUtil::stripSlashes($_GET["newdir"]));
370 
371  if($new_subdir == "..")
372  {
373  $cur_subdir = substr($cur_subdir, 0, strrpos($cur_subdir, "/"));
374  }
375  else
376  {
377  if (!empty($new_subdir))
378  {
379  if (!empty($cur_subdir))
380  {
381  $cur_subdir = $cur_subdir."/".$new_subdir;
382  }
383  else
384  {
385  $cur_subdir = $new_subdir;
386  }
387  }
388  }
389 
390  $cur_subdir = str_replace("..", "", $cur_subdir);
391  $cur_dir = (!empty($cur_subdir))
392  ? $this->main_dir."/".$cur_subdir
393  : $this->main_dir;
394 
395  $this->ctrl->setParameter($this, "cdir", $cur_subdir);
396 
397  // toolbar for adding files/directories
398  $ilToolbar->setFormAction($ilCtrl->getFormAction($this), true);
399  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
400 
401  if ($this->getAllowDirectories() && $this->getAllowDirectoryCreation())
402  {
403  $ti = new ilTextInputGUI($this->lng->txt("cont_new_dir"), "new_dir");
404  $ti->setMaxLength(80);
405  $ti->setSize(10);
406  $ilToolbar->addInputItem($ti, true);
407  $ilToolbar->addFormButton($lng->txt("create"), "createDirectory");
408 
409  $ilToolbar->addSeparator();
410  }
411 
412  include_once("./Services/Form/classes/class.ilFileInputGUI.php");
413  if ($this->getAllowFileCreation())
414  {
415  $fi = new ilFileInputGUI($this->lng->txt("cont_new_file"), "new_file");
416  $fi->setSize(10);
417  $ilToolbar->addInputItem($fi, true);
418  $ilToolbar->addFormButton($lng->txt("upload"), "uploadFile");
419  }
420 
421  include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
423  {
424  $ilToolbar->addSeparator();
426  $options[""] = $lng->txt("cont_select_from_upload_dir");
427  foreach($files as $file)
428  {
429  $file = htmlspecialchars($file, ENT_QUOTES, "utf-8");
430  $options[$file] = $file;
431  }
432  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
433  $si = new ilSelectInputGUI($this->lng->txt("cont_uploaded_file"), "uploaded_file");
434  $si->setOptions($options);
435  $ilToolbar->addInputItem($si, true);
436  $ilToolbar->addFormButton($lng->txt("copy"), "uploadFile");
437  }
438 
439  // load files templates
440  include_once("./Services/FileSystem/classes/class.ilFileSystemTableGUI.php");
441  $fs_table = new ilFileSystemTableGUI($this, "listFiles", $cur_dir, $cur_subdir,
442  $this->label_enable, $this->file_labels, $this->label_header, $this->commands,
443  $this->getPostDirPath(), $this->getTableId());
444  if ($this->getTitle() != "")
445  {
446  $fs_table->setTitle($this->getTitle());
447  }
448  if ($_GET["resetoffset"] == 1)
449  {
450  $fs_table->resetOffset();
451  }
452  $this->tpl->setContent($fs_table->getHTML());
453  }
454 
458  function renameFileForm()
459  {
460  global $lng, $ilCtrl;
461 
462  if (!isset($_POST["file"]))
463  {
464  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
465  }
466 
467  if (count($_POST["file"]) > 1)
468  {
469  $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
470  }
471 
472  if (ilUtil::stripSlashes($_POST["file"][0]) == ".." )
473  {
474  $this->ilias->raiseError($this->lng->txt("select_a_file"),$this->ilias->error_obj->MESSAGE);
475  }
476 
477  $cur_subdir = str_replace(".", "", ilUtil::stripSlashes($_GET["cdir"]));
478  $file = (!empty($cur_subdir))
479  ? $this->main_dir."/".$cur_subdir."/".ilUtil::stripSlashes($_POST["file"][0])
480  : $this->main_dir."/".ilUtil::stripSlashes($_POST["file"][0]);
481 
482  $this->ctrl->setParameter($this, "old_name", ilUtil::stripSlashes($_POST["file"][0]));
483 
484  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
485  $form = new ilPropertyFormGUI();
486 
487  // file/dir name
488  $ti = new ilTextInputGUI($this->lng->txt("name"), "new_name");
489  $ti->setMaxLength(200);
490  $ti->setSize(40);
491  $ti->setValue(ilUtil::stripSlashes($_POST["file"][0]));
492  $form->addItem($ti);
493 
494  // save and cancel commands
495  $form->addCommandButton("renameFile", $lng->txt("rename"));
496  $form->addCommandButton("cancelRename", $lng->txt("cancel"));
497  $form->setFormAction($ilCtrl->getFormAction($this, "renameFile"));
498 
499  if (@is_dir($file))
500  {
501  $form->setTitle($this->lng->txt("cont_rename_dir"));
502  }
503  else
504  {
505  $form->setTitle($this->lng->txt("rename_file"));
506  }
507 
508  $this->tpl->setContent($form->getHTML());
509  }
510 
514  function renameFile()
515  {
516  global $lng;
517 
518  $new_name = str_replace("..", "", ilUtil::stripSlashes($_POST["new_name"]));
519  $new_name = str_replace("/", "", $new_name);
520  if ($new_name == "")
521  {
522  $this->ilias->raiseError($this->lng->txt("enter_new_name"),$this->ilias->error_obj->MESSAGE);
523  }
524 
525  $cur_subdir = str_replace(".", "", ilUtil::stripSlashes($_GET["cdir"]));
526  $dir = (!empty($cur_subdir))
527  ? $this->main_dir."/".$cur_subdir."/"
528  : $this->main_dir."/";
529 
530  rename($dir.ilUtil::stripSlashes($_GET["old_name"]), $dir.$new_name);
531 
532  ilUtil::renameExecutables($this->main_dir);
533  if (@is_dir($dir.$new_name))
534  {
535  ilUtil::sendSuccess($lng->txt("cont_dir_renamed"), true);
536  $this->setPerformedCommand("rename_dir", array("old_name" => $_GET["old_name"],
537  "new_name" => $new_name));
538  }
539  else
540  {
541  ilUtil::sendSuccess($lng->txt("cont_file_renamed"), true);
542  $this->setPerformedCommand("rename_file", array("old_name" => $_GET["old_name"],
543  "new_name" => $new_name));
544  }
545  $this->ctrl->redirect($this, "listFiles");
546  }
547 
551  function cancelRename()
552  {
553  $this->ctrl->redirect($this, "listFiles");
554  }
555 
559  function createDirectory()
560  {
561  global $lng;
562 
563  // determine directory
564  $cur_subdir = str_replace(".", "", ilUtil::stripSlashes($_GET["cdir"]));
565  $cur_dir = (!empty($cur_subdir))
566  ? $this->main_dir."/".$cur_subdir
567  : $this->main_dir;
568 
569  $new_dir = str_replace(".", "", ilUtil::stripSlashes($_POST["new_dir"]));
570  $new_dir = str_replace("/", "", $new_dir);
571 
572  if (!empty($new_dir))
573  {
574  ilUtil::makeDir($cur_dir."/".$new_dir);
575  if (is_dir($cur_dir."/".$new_dir))
576  {
577  ilUtil::sendSuccess($lng->txt("cont_dir_created"), true);
578  $this->setPerformedCommand("create_dir", array("name" => $new_dir));
579  }
580  }
581  else
582  {
583  ilUtil::sendFailure($lng->txt("cont_enter_a_dir_name"), true);
584  }
585  $this->ctrl->saveParameter($this, "cdir");
586  $this->ctrl->redirect($this, "listFiles");
587  }
588 
592  function uploadFile()
593  {
594  global $lng;
595 
596  // determine directory
597  $cur_subdir = str_replace(".", "", ilUtil::stripSlashes($_GET["cdir"]));
598  $cur_dir = (!empty($cur_subdir))
599  ? $this->main_dir."/".$cur_subdir
600  : $this->main_dir;
601 
602  $tgt_file = null;
603 
604  if (is_file($_FILES["new_file"]["tmp_name"]))
605  {
606  $tgt_file = $cur_dir."/".ilUtil::stripSlashes($_FILES["new_file"]["name"]);
607 
608  move_uploaded_file($_FILES["new_file"]["tmp_name"], $tgt_file);
609 
610  }
611  elseif ($_POST["uploaded_file"])
612  {
613  include_once 'Services/FileSystem/classes/class.ilUploadFiles.php';
614 
615  // check if the file is in the ftp directory and readable
616  if (ilUploadFiles::_checkUploadFile($_POST["uploaded_file"]))
617  {
618  $tgt_file = $cur_dir."/".ilUtil::stripSlashes($_POST["uploaded_file"]);
619 
620  // copy uploaded file to data directory
621  ilUploadFiles::_copyUploadFile($_POST["uploaded_file"], $tgt_file);
622  }
623  }
624  else if (trim($_FILES["new_file"]["name"]) == "")
625  {
626  ilUtil::sendFailure($lng->txt("cont_enter_a_file"), true);
627  }
628 
629  if($tgt_file && is_file($tgt_file))
630  {
631  $unzip = null;
632 
633  // extract zip?
634  include_once("./Services/Utilities/classes/class.ilMimeTypeUtil.php");
635  if(ilMimeTypeUtil::getMimeType($tgt_file) == "application/zip")
636  {
637  $this->ctrl->setParameter($this, "upfile", basename($tgt_file));
638  $url = $this->ctrl->getLinkTarget($this, "unzipFile");
639  $this->ctrl->setParameter($this, "upfile", "");
640 
641  include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
642  $unzip = ilLinkButton::getInstance();
643  $unzip->setCaption("unzip");
644  $unzip->setUrl($url);
645  $unzip = " ".$unzip->render();
646  }
647 
648  ilUtil::sendSuccess($lng->txt("cont_file_created").$unzip, true);
649 
650  $this->setPerformedCommand("create_file",
651  array("name" => substr($tgt_file, strlen($this->main_dir)+1)));
652  }
653 
654  $this->ctrl->saveParameter($this, "cdir");
655 
656  ilUtil::renameExecutables($this->main_dir);
657 
658  $this->ctrl->redirect($this, "listFiles");
659  }
660 
664  function confirmDeleteFile()
665  {
666  global $ilCtrl, $tpl, $lng;
667 
668  if (!is_array($_POST["file"]) || count($_POST["file"]) == 0)
669  {
670  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
671  $ilCtrl->redirect($this, "listFile");
672  }
673  else
674  {
675  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
676  $cgui = new ilConfirmationGUI();
677  $cgui->setFormAction($ilCtrl->getFormAction($this));
678  $cgui->setHeaderText($lng->txt("info_delete_sure"));
679  $cgui->setCancel($lng->txt("cancel"), "listFiles");
680  $cgui->setConfirm($lng->txt("delete"), "deleteFile");
681 
682  foreach ($_POST["file"] as $i)
683  {
684  $cgui->addItem("file[]", $i, $i);
685  }
686 
687  $tpl->setContent($cgui->getHTML());
688  }
689  }
690 
694  function deleteFile()
695  {
696  global $lng;
697 
698  if (!isset($_POST["file"]))
699  {
700  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
701  }
702 
703  foreach ($_POST["file"] as $post_file)
704  {
705  if (ilUtil::stripSlashes($post_file) == "..")
706  {
707  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
708  break;
709  }
710 
711  $cur_subdir = str_replace(".", "", ilUtil::stripSlashes($_GET["cdir"]));
712  $cur_dir = (!empty($cur_subdir))
713  ? $this->main_dir."/".$cur_subdir
714  : $this->main_dir;
715  $file = $cur_dir."/".ilUtil::stripSlashes($post_file);
716 
717  if (@is_file($file))
718  {
719  unlink($file);
720  }
721 
722  if (@is_dir($file))
723  {
724  $is_dir = true;
726  }
727  }
728 
729  $this->ctrl->saveParameter($this, "cdir");
730  if ($is_dir)
731  {
732  ilUtil::sendSuccess($lng->txt("cont_dir_deleted"), true);
733  $this->setPerformedCommand("delete_dir",
734  array("name" => ilUtil::stripSlashes($post_file)));
735  }
736  else
737  {
738  ilUtil::sendSuccess($lng->txt("cont_file_deleted"), true);
739  $this->setPerformedCommand("delete_file",
740  array("name" => ilUtil::stripSlashes($post_file)));
741  }
742  $this->ctrl->redirect($this, "listFiles");
743  }
744 
748  function unzipFile()
749  {
750  global $lng;
751 
752  if (isset($_GET["upfile"]))
753  {
754  $file = basename($_GET["upfile"]);
755  }
756  else
757  {
758  if (!isset($_POST["file"]))
759  {
760  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
761  }
762 
763  if (count($_POST["file"]) > 1)
764  {
765  $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
766  }
767 
768  $file = basename($_POST["file"][0]);
769  }
770 
771  $cur_subdir = str_replace(".", "", ilUtil::stripSlashes($_GET["cdir"]));
772  $cur_dir = (!empty($cur_subdir))
773  ? $this->main_dir."/".$cur_subdir
774  : $this->main_dir;
775  $file = $cur_dir."/".ilUtil::stripSlashes($file);
776 
777  if (@is_file($file))
778  {
779  $cur_files = array_keys(ilUtil::getDir($cur_dir));
780 
781  if ($this->getAllowDirectories())
782  {
783  ilUtil::unzip($file, true);
784  }
785  else
786  {
787  ilUtil::unzip($file, true, true);
788  }
789 
790  $new_files = array_keys(ilUtil::getDir($cur_dir));
791 
792  $diff = array_diff($new_files, $cur_files);
793  if(sizeof($diff))
794  {
795  if ($this->getAllowDirectories())
796  {
797  include_once("./Services/Utilities/classes/class.ilFileUtils.php");
798  $new_files = array();
799 
800  foreach($diff as $new_item)
801  {
802  if(is_dir($cur_dir."/".$new_item))
803  {
804  ilFileUtils::recursive_dirscan($cur_dir."/".$new_item, $new_files);
805  }
806  }
807 
808  if(is_array($new_files["path"]))
809  {
810  foreach($new_files["path"] as $idx => $path)
811  {
812  $path = substr($path, strlen($this->main_dir)+1);
813  $diff[] = $path.$new_files["file"][$idx];
814  }
815  }
816  }
817 
818  $this->setPerformedCommand("unzip_file",
819  array("name" => substr($file, strlen($this->main_dir)+1),
820  "added" => $diff));
821  }
822  }
823 
824  ilUtil::renameExecutables($this->main_dir);
825 
826  $this->ctrl->saveParameter($this, "cdir");
827  ilUtil::sendSuccess($lng->txt("cont_file_unzipped"), true);
828  $this->ctrl->redirect($this, "listFiles");
829  }
830 
834  function downloadFile()
835  {
836  if (!isset($_POST["file"]))
837  {
838  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
839  }
840 
841  if (count($_POST["file"]) > 1)
842  {
843  $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
844  }
845 
846  $cur_subdir = str_replace(".", "", ilUtil::stripSlashes($_GET["cdir"]));
847  $cur_dir = (!empty($cur_subdir))
848  ? $this->main_dir."/".$cur_subdir
849  : $this->main_dir;
850  $file = $cur_dir."/".$_POST["file"][0];
851 
852  // validate against files of current directory
853  $valid = false;
854  foreach(ilUtil::getDir($cur_dir) as $entry)
855  {
856  if($entry["type"] == "file" &&
857  $cur_dir."/".$entry["entry"] == $file)
858  {
859  $valid = true;
860  break;
861  }
862  }
863 
864  if (@is_file($file) && !(@is_dir($file)) && $valid)
865  {
866  ilUtil::deliverFile($file, $_POST["file"][0]);
867  exit;
868  }
869  else
870  {
871  $this->ctrl->saveParameter($this, "cdir");
872  $this->ctrl->redirect($this, "listFiles");
873  }
874  }
875 
879  function getTabs(&$tabs_gui)
880  {
881  global $ilCtrl;
882 
883  $ilCtrl->setParameter($this, "resetoffset", 1);
884  $tabs_gui->addTarget("cont_list_files",
885  $this->ctrl->getLinkTarget($this, "listFiles"), "listFiles",
886  get_class($this));
887  $ilCtrl->setParameter($this, "resetoffset", "");
888  }
889 
890 }
891 ?>