Skip to content

Commit 9c378df

Browse files
committed
[FIX] 0045966: Error when editing footer group Legal Information
# Conflicts: # components/ILIAS/GlobalScreen/classes/UI/Footer/Entries/EntriesTable.php # components/ILIAS/GlobalScreen/classes/UI/Footer/Groups/GroupsTable.php
1 parent 546bcf3 commit 9c378df

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

components/ILIAS/GlobalScreen/classes/UI/Footer/Entries/EntriesTable.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,15 @@ public function getRows(OrderingRowBuilder $row_builder, array $visible_column_i
6767
$nok = $this->pons->out()->nok();
6868

6969
foreach ($this->repository->allForParent($this->group->getId()) as $entry) {
70-
$title = $this->translations_repository->get($entry)->getDefault()?->getTranslation() ?? $entry->getTitle();
70+
if ($entry->isCore()) {
71+
$title = $this->collector->getSingleItemFromRaw(
72+
$this->identification->fromSerializedIdentification($entry->getId()),
73+
)?->getTitle() ?? 'Unknown';
74+
} else {
75+
$title = $this->translations_repository->get($entry)->getDefault()?->getTranslation(
76+
) ?? $entry->getTitle();
77+
}
78+
7179
$row = $row_builder->buildOrderingRow(
7280
$this->hash($entry->getId()),
7381
[

components/ILIAS/GlobalScreen/classes/UI/Footer/Groups/GroupsTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function getRows(OrderingRowBuilder $row_builder, array $visible_column_i
7878
if ($group->isCore()) {
7979
$title = $this->collector->getSingleItemFromRaw(
8080
$this->identification->fromSerializedIdentification($group->getId()),
81-
)?->getTitle()??'';
81+
)?->getTitle() ?? 'Unknown';
8282
} else {
8383
$title = $this->translations_repository->get($group)->getDefault()?->getTranslation(
8484
) ?? $group->getTitle();

components/ILIAS/GlobalScreen/src/Scope/Footer/Collector/FooterMainCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,15 @@ public function hasVisibleItems(): bool
172172
/**
173173
* @deprecated
174174
*/
175-
public function getSingleItemFromFilter(IdentificationInterface $identification): isItem
175+
public function getSingleItemFromFilter(IdentificationInterface $identification): ?isItem
176176
{
177177
return $this->map->getSingleItemFromFilter($identification);
178178
}
179179

180180
/**
181181
* @deprecated
182182
*/
183-
public function getSingleItemFromRaw(IdentificationInterface $identification): isItem
183+
public function getSingleItemFromRaw(IdentificationInterface $identification): ?isItem
184184
{
185185
return $this->map->getSingleItemFromRaw($identification);
186186
}

0 commit comments

Comments
 (0)