@@ -41,32 +41,24 @@ class ilForumCronNotification extends ilCronJob
4141 /** @var array<int, ilObjCourse|ilObjGroup|null> */
4242 private static array $ container_by_frm_ref_id = [];
4343
44- private readonly ilLanguage $ lng ;
45- private readonly ilSetting $ settings ;
44+ private ilSetting $ settings ;
4645 private ilLogger $ logger ;
4746 private ilTree $ tree ;
4847 private int $ num_sent_messages = 0 ;
49- private readonly ilDBInterface $ ilDB ;
50- private readonly ilForumNotificationCache $ notificationCache ;
51- private readonly \ILIAS \Refinery \Factory $ refinery ;
52- private readonly ilCronManager $ cronManager ;
53-
54- public function __construct (
55- ilDBInterface $ database = null ,
56- ilForumNotificationCache $ notificationCache = null ,
57- ilLanguage $ lng = null ,
58- ilSetting $ settings = null ,
59- \ILIAS \Refinery \Factory $ refinery = null ,
60- ilCronManager $ cronManager = null
61- ) {
62- global $ DIC ;
48+ private ilDBInterface $ ilDB ;
49+ private ilForumNotificationCache $ notificationCache ;
50+ private \ILIAS \Refinery \Factory $ refinery ;
51+ private ilCronManager $ cronManager ;
6352
64- $ this ->settings = $ settings ?? new ilSetting ('frma ' );
65- $ this ->lng = $ lng ?? $ DIC ->language ();
66- $ this ->ilDB = $ database ?? $ DIC ->database ();
67- $ this ->notificationCache = $ notificationCache ?? new ilForumNotificationCache ();
68- $ this ->refinery = $ refinery ?? $ DIC ->refinery ();
69- $ this ->cronManager = $ cronManager ?? $ DIC ->cron ()->manager ();
53+ public function init (): void
54+ {
55+ $ this ->logger = $ this ->logger_factory ->getLogger ('frm ' );
56+ global $ DIC ;
57+ $ this ->settings = new ilSetting ('frma ' );
58+ $ this ->ilDB = $ DIC ->database ();
59+ $ this ->notificationCache = new ilForumNotificationCache ();
60+ $ this ->refinery = $ DIC ->refinery ();
61+ $ this ->cronManager = $ DIC ->cron ()->manager ();
7062 }
7163
7264 public function getId (): string
@@ -119,8 +111,6 @@ public function keepAlive(): void
119111 public function run (): ilCronJobResult
120112 {
121113 global $ DIC ;
122-
123- $ this ->logger = $ DIC ->logger ()->frm ();
124114 $ this ->tree = $ DIC ->repositoryTree ();
125115
126116 $ status = ilCronJobResult::STATUS_NO_ACTION ;
0 commit comments