ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilCronValidator Class Reference
+ Collaboration diagram for ilCronValidator:

Public Member Functions

 check ()
 

Detailed Description

Definition at line 13 of file class.ilCronValidator.php.

Member Function Documentation

◆ check()

ilCronValidator::check ( )

Definition at line 15 of file class.ilCronValidator.php.

References $ilUser, $lng, and array.

16  {
17  global $ilUser, $lng;
18 
19  $count_limit = (bool) $ilUser->getPref('systemcheck_count_limit');
20  $age_limit = (bool) $ilUser->getPref('systemcheck_age_limit');
21  $type_limit = $ilUser->getPref('systemcheck_type_limit');
22 
23  $lng->loadLanguageModule("administration"); // #13486
24 
25  include_once "./Services/Repository/classes/class.ilValidator.php";
26  $validator = new ilValidator(true);
27 
28  $modes = array();
29  $possible_modes = $validator->getPossibleModes();
30  foreach ($possible_modes as $possible_mode) {
31  $pref_key = 'systemcheck_mode_' . $possible_mode;
32  $modes[$possible_mode] = (bool) $ilUser->getPref($pref_key);
33  }
34 
35  ob_start();
36 
37  $validator->setMode("all", false);
38 
39  $used_modes = array();
40  foreach ($modes as $mode => $value) {
41  $validator->setMode($mode, (bool) $value);
42  $used_modes[] = $mode . '=' . $value;
43  }
44 
45  $scan_log = $validator->validate();
46 
47  $mode = $lng->txt("scan_modes") . ": " . implode(', ', $used_modes);
48 
49  // output
50  echo $lng->txt("scanning_system");
51  echo $scan_log . "\n";
52  echo $mode . "\n";
53  if ($logging === true) {
54  echo $lng->txt("view_log");
55  }
56 
57  $validator->writeScanLogLine($mode);
58 
59  $echo = ob_get_contents();
60  ob_end_clean();
61 
62  $echo = preg_replace("/<br\/>/", "\n", $echo);
63  $echo = preg_replace("/<br \/>/", "\n", $echo);
64  $echo = preg_replace("/<br>/", "\n", $echo);
65  echo $echo;
66  }
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
global $lng
Definition: privfeed.php:17
ILIAS Data Validator & Recovery Tool.

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