ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SanitationReportJob.php
Go to the documentation of this file.
1 <?php
2 
3 namespace ILIAS\File\Sanitation;
4 
10 use ilObjFile;
11 
18 {
19  public function run(array $input, Observer $observer)
20  {
21  global $DIC;
22 
23  $q = "SELECT * FROM object_data WHERE type='file'";
24  $s = $DIC->database()->query($q);
25 
26  $files_ids = [];
27 
28  while ($data = $DIC->database()->fetchObject($s)) {
29  $file_object = new ilObjFile($data->obj_id, false);
30  $san = new FilePathSanitizer($file_object);
31  if ($san->needsSanitation()) {
32  $files_ids[] = (int) $data->obj_id;
33  }
34  }
35 
36  $list = new ListValue();
37  $list->setValue($files_ids);
38 
39  return $list;
40  }
41 
42 
43  public function isStateless()
44  {
45  return false;
46  }
47 
48 
50  {
51  return 3600;
52  }
53 
54 
55  public function getInputTypes()
56  {
57  return array();
58  }
59 
60 
61  public function getOutputType()
62  {
63  return new ListType(IntegerValue::class);
64  }
65 }
if(isset($_REQUEST['delete'])) $list
Definition: registry.php:41
global $DIC
Definition: saml.php:7
$s
Definition: pwgen.php:45
run(array $input, Observer $observer)
$data
Definition: bench.php:6