ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilCronValidator.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
14 {
15 public function check()
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 {
32 $pref_key = 'systemcheck_mode_'.$possible_mode;
33 $modes[$possible_mode] = (bool)$ilUser->getPref($pref_key);
34 }
35
36 ob_start();
37
38 $validator->setMode("all",false);
39
40 $used_modes = array();
41 foreach($modes as $mode => $value)
42 {
43 $validator->setMode($mode,(bool) $value);
44 $used_modes[] = $mode.'='.$value;
45 }
46
47 $scan_log = $validator->validate();
48
49 $mode = $lng->txt("scan_modes").": ".implode(', ',$used_modes);
50
51 // output
52 echo $lng->txt("scanning_system");
53 echo $scan_log."\n";
54 echo $mode."\n";
55 if ($logging === true)
56 {
57 echo $lng->txt("view_log");
58 }
59
60 $validator->writeScanLogLine($mode);
61
62 $echo = ob_get_contents();
63 ob_end_clean();
64
65 $echo = preg_replace("/<br\/>/","\n",$echo);
66 $echo = preg_replace("/<br \/>/","\n",$echo);
67 $echo = preg_replace("/<br>/","\n",$echo);
68 echo $echo;
69 }
70 }
71
72
73?>
An exception for terminatinating execution or to throw for unit testing.
ILIAS Data Validator & Recovery Tool.
global $lng
Definition: privfeed.php:17
$ilUser
Definition: imgupload.php:18