From 81045eea34cfd421547b2e9664330bd17d95c9c4 Mon Sep 17 00:00:00 2001 From: Stephan Kergomard Date: Tue, 1 Oct 2024 18:44:39 +0200 Subject: [PATCH] Object: Fix Too Long Title On Copy See: https://mantis.ilias.de/view.php?id=42204 --- Services/Object/classes/class.ilObject.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Services/Object/classes/class.ilObject.php b/Services/Object/classes/class.ilObject.php index fb1d1080474b..733c70640d06 100755 --- a/Services/Object/classes/class.ilObject.php +++ b/Services/Object/classes/class.ilObject.php @@ -1580,8 +1580,10 @@ public function cloneObject(int $target_id, int $copy_id = 0, bool $omit_tree = $this->obj_log->debug("isTreeCopyDisabled: " . $options->isTreeCopyDisabled()); $this->obj_log->debug("omit_tree: " . $omit_tree); if (!$options->isTreeCopyDisabled() && !$omit_tree) { - $title = $this->appendCopyInfo($target_id, $copy_id); + $title_with_suffix = $this->appendCopyInfo($target_id, $copy_id); + $title = strlen($title_with_suffix) < self::TITLE_LENGTH ? $title_with_suffix : $title; $this->obj_log->debug("title incl. copy info: " . $title); + } /** @var ilObject $new_obj */