Skip to content

Commit ff355c4

Browse files
committed
46633: Failed test: Bestehendes Glossar importieren
1 parent 93771e0 commit ff355c4

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

components/ILIAS/COPage/PC/MediaObject/class.ilPCMediaObject.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ public static function afterPageUpdate(
259259
0,
260260
$a_page->getLanguage()
261261
);
262-
self::saveMobUsage($a_page, $a_domdoc);
262+
}
263+
self::saveMobUsage($a_page, $a_domdoc);
264+
if (!$a_page->getImportMode()) {
263265
foreach ($mob_ids as $mob) { // check, whether media object can be deleted
264266
if (ilObject::_exists($mob) && ilObject::_lookupType($mob) == "mob") {
265267
$mob_obj = new ilObjMediaObject($mob);

components/ILIAS/Glossary/Export/class.ilGlossaryImporter.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,13 @@ public function finalProcessing(
103103
}
104104
}
105105
}
106+
// update parent id of definition page
107+
$maps = $a_mapping->getMappingsOfEntity("components/ILIAS/Glossary", "term");
108+
foreach ($maps as $old => $new) {
109+
$glo_id = ilGlossaryTerm::_lookGlossaryID($new);
110+
if ($glo_id > 0) {
111+
ilGlossaryDefPage::_writeParentId("term", $new, $glo_id);
112+
}
113+
}
106114
}
107115
}

0 commit comments

Comments
 (0)