Skip to content

Commit 31e3d97

Browse files
committed
Component/OrgUnits: contribute cron jobs
1 parent 377d9db commit 31e3d97

3 files changed

Lines changed: 7 additions & 16 deletions

File tree

components/ILIAS/OrgUnit/OrgUnit.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,11 @@ public function init(
3838
);
3939
$contribute[Component\Resource\PublicAsset::class] = fn() =>
4040
new Component\Resource\ComponentJS($this, "authority.js");
41+
42+
$contribute[\ILIAS\Cron\CronJob::class] = static fn() =>
43+
new \ilCronUpdateOrgUnitPaths(
44+
'components\\' . self::class,
45+
$use[\ILIAS\Language\Language::class]
46+
);
4147
}
4248
}

components/ILIAS/OrgUnit/classes/class.ilCronUpdateOrgUnitPaths.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@
2626
class ilCronUpdateOrgUnitPaths extends ilCronJob
2727
{
2828
public const ID = "orgunit_paths";
29-
protected ilDBInterface $db;
30-
protected ilLogger $log;
31-
protected ilTree $tree;
32-
33-
private ilLanguage $lng;
34-
35-
public function __construct()
36-
{
37-
global $DIC;
38-
39-
$this->lng = $DIC->language();
40-
}
4129

4230
public function getId(): string
4331
{

components/ILIAS/OrgUnit/module.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,4 @@
2323
<pluginslots>
2424
<pluginslot id="orguext" name="OrgUnitExtension"/>
2525
</pluginslots>
26-
<crons>
27-
<cron id="orgunit_paths" class="ilCronUpdateOrgUnitPaths"/>
28-
</crons>
29-
</module>
26+
</module>

0 commit comments

Comments
 (0)