ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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

ilCronValidator::__construct ( )

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

{
}

Member Function Documentation

ilCronValidator::check ( )

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

References $lng.

{
global $ilUser,$rbacsystem,$lng;
$count_limit = (bool)$ilUser->getPref('systemcheck_count_limit');
$age_limit = (bool)$ilUser->getPref('systemcheck_age_limit');
$type_limit = $ilUser->getPref('systemcheck_type_limit');
include_once "classes/class.ilValidator.php";
$validator = new ilValidator(true);
$modes = array();
$possible_modes = $validator->getPossibleModes();
foreach($possible_modes as $possible_mode)
{
$pref_key = 'systemcheck_mode_'.$possible_mode;
$modes[$possible_mode] = (bool)$ilUser->getPref($pref_key);
}
ob_start();
/*if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}*/
$validator->setMode("all",false);
$used_modes = array();
foreach($modes as $mode => $value)
{
$validator->setMode($mode,(bool) $value);
$used_modes[] = $mode.'='.$value;
}
$scan_log = $validator->validate();
$mode = $lng->txt("scan_modes").": ".implode(', ',$used_modes);
// output
echo $lng->txt("scanning_system");
echo $scan_log."\n";
echo $mode."\n";
if ($logging === true)
{
echo $lng->txt("view_log");
}
$validator->writeScanLogLine($mode);
$echo = ob_get_contents();
ob_end_clean();
$echo = preg_replace("/<br\/>/","\n",$echo);
$echo = preg_replace("/<br \/>/","\n",$echo);
$echo = preg_replace("/<br>/","\n",$echo);
echo $echo;
}

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