File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,6 +100,11 @@ public function getTarget(): string
100100 return "assets/js/ilIntLink.js " ;
101101 }
102102 };
103-
103+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
104+ new \ilCleanCOPageHistoryCronjob (
105+ 'components \\' . self ::class,
106+ $ use [\ILIAS \Language \Language::class],
107+ true
108+ );
104109 }
105110}
Original file line number Diff line number Diff line change @@ -28,13 +28,22 @@ class ilCleanCOPageHistoryCronjob extends ilCronJob
2828{
2929 protected HistoryManager $ history_manager ;
3030 protected ilSetting $ settings ;
31- protected ilLanguage $ lng ;
3231
33- public function __construct ()
32+
33+ public function __construct (
34+ string $ component ,
35+ \ILIAS \Language \Language $ lng ,
36+ bool $ registration = false
37+ ) {
38+ parent ::__construct ($ component , $ lng );
39+ if (!$ registration ) {
40+ $ this ->additionalConstruct ();
41+ }
42+ }
43+
44+ private function additionalConstruct ()
3445 {
3546 global $ DIC ;
36-
37- $ this ->lng = $ DIC ->language ();
3847 $ this ->settings = $ DIC ->settings ();
3948 $ this ->history_manager = $ DIC
4049 ->copage ()
Original file line number Diff line number Diff line change 3838 <pageobject parent_type =" stys" class_name =" ilPageLayoutPage" directory =" Layout/classes" />
3939 </copage >
4040 <logging />
41- <crons >
42- <cron id =" copg_history_cleanup" class =" ilCleanCOPageHistoryCronjob" path =" Services/COPage/Cron" />
43- </crons >
4441</service >
You can’t perform that action at this time.
0 commit comments