4 include_once
"Services/Cron/classes/class.ilCronJob.php";
26 $GLOBALS[
'lng']->loadLanguageModule(
'sysc');
27 return $lng->txt(
'sysc_cron_empty_trash');
34 $GLOBALS[
'lng']->loadLanguageModule(
'sysc');
35 return $lng->txt(
'sysc_cron_empty_trash_desc');
40 return self::SCHEDULE_TYPE_WEEKLY;
51 self::SCHEDULE_TYPE_DAILY,
52 self::SCHEDULE_TYPE_WEEKLY,
53 self::SCHEDULE_TYPE_MONTHLY,
54 self::SCHEDULE_TYPE_QUARTERLY,
55 self::SCHEDULE_TYPE_YEARLY
93 $lng->loadLanguageModule(
'sysc');
95 include_once
'./Services/Administration/classes/class.ilSetting.php';
100 $num->
setInfo($lng->txt(
'purge_count_limit_desc'));
102 $num->setMinValue(1);
103 $num->setValue($settings->get(
'num',
''));
107 $age->
setInfo($lng->txt(
'purge_age_limit_desc'));
109 $age->setMinValue(1);
110 $age->setMaxLength(4);
112 if ($settings->get(
'age',
'')) {
113 $age->setValue($settings->get(
'age',
''));
120 $sub_objects =
$GLOBALS[
'tree']->lookupTrashedObjectTypes();
124 foreach ($sub_objects as $obj_type) {
125 if (!
$GLOBALS[
'objDefinition']->isRBACObject($obj_type) or !
$GLOBALS[
'objDefinition']->isAllowedInRepository($obj_type)) {
128 $options[$obj_type] = $lng->txt(
'obj_' . $obj_type);
132 $types->setValue($settings->get(
'types',
''));
146 include_once
'./Services/Administration/classes/class.ilSetting.php';
149 $settings->set(
'num', $a_form->
getInput(
'number'));
150 $settings->set(
'age', $a_form->
getInput(
'age'));
151 $settings->set(
'types', $a_form->
getInput(
'types'));
161 include_once
'./Services/SystemCheck/classes/class.ilSystemCheckTrash.php';
165 include_once
'./Services/Administration/classes/class.ilSetting.php';
168 $trash->setNumberLimit($settings->get(
'num', 0));
169 $trash->setTypesLimit((
array) $settings->get(
'types'));
171 $age = $settings->get(
'age', 0);
174 $date->increment(
IL_CAL_DAY, (
int) $age * -1);
175 $trash->setAgeLimit($date);
179 include_once
'./Services/Cron/classes/class.ilCronJobResult.php';
Cron job application base class.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
addCustomSettingsToForm(ilPropertyFormGUI $form)
Add custom settings to form.
saveCustomSettings(ilPropertyFormGUI $a_form)
Save custom settings.
getDefaultScheduleValue()
if(isset($_POST['submit'])) $form
getValidScheduleTypes()
Get all available schedule types.
Create styles array
The data for the language used.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
Cron job result data container.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options