ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilCronValidator Class Reference
+ Collaboration diagram for ilCronValidator:

Public Member Functions

 __construct ()
 
 check ()
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilCronValidator::__construct ( )

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

16 {
17
18 }

Member Function Documentation

◆ check()

ilCronValidator::check ( )

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

21 {
22 global $ilUser,$rbacsystem,$lng;
23
24 $count_limit = (bool)$ilUser->getPref('systemcheck_count_limit');
25 $age_limit = (bool)$ilUser->getPref('systemcheck_age_limit');
26 $type_limit = $ilUser->getPref('systemcheck_type_limit');
27
28 $lng->loadLanguageModule("administration"); // #13486
29
30 include_once "./Services/Repository/classes/class.ilValidator.php";
31 $validator = new ilValidator(true);
32
33 $modes = array();
34 $possible_modes = $validator->getPossibleModes();
35 foreach($possible_modes as $possible_mode)
36 {
37 $pref_key = 'systemcheck_mode_'.$possible_mode;
38 $modes[$possible_mode] = (bool)$ilUser->getPref($pref_key);
39 }
40
41 ob_start();
42
43 /*if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
44 {
45 $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
46 }*/
47
48 $validator->setMode("all",false);
49
50 $used_modes = array();
51 foreach($modes as $mode => $value)
52 {
53 $validator->setMode($mode,(bool) $value);
54 $used_modes[] = $mode.'='.$value;
55 }
56
57 $scan_log = $validator->validate();
58
59 $mode = $lng->txt("scan_modes").": ".implode(', ',$used_modes);
60
61 // output
62 echo $lng->txt("scanning_system");
63 echo $scan_log."\n";
64 echo $mode."\n";
65 if ($logging === true)
66 {
67 echo $lng->txt("view_log");
68 }
69
70 $validator->writeScanLogLine($mode);
71
72 $echo = ob_get_contents();
73 ob_end_clean();
74
75 $echo = preg_replace("/<br\/>/","\n",$echo);
76 $echo = preg_replace("/<br \/>/","\n",$echo);
77 $echo = preg_replace("/<br>/","\n",$echo);
78 echo $echo;
79 }
ILIAS Data Validator & Recovery Tool.
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15

References $ilUser, and $lng.


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