From 9d155f1f3e604f91f31d9a17dca0a0e998c3d8bc Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 10 Jun 2021 07:52:01 +0200 Subject: [PATCH] Show embedded objects after editing comments --- .../files/lib/data/comment/CommentAction.class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/comment/CommentAction.class.php b/wcfsetup/install/files/lib/data/comment/CommentAction.class.php index fc731c03b2..0c46b9fe9e 100644 --- a/wcfsetup/install/files/lib/data/comment/CommentAction.class.php +++ b/wcfsetup/install/files/lib/data/comment/CommentAction.class.php @@ -1041,9 +1041,18 @@ class CommentAction extends AbstractDatabaseObjectAction implements IMessageInli ]); $action->executeAction(); + $comment = new Comment($this->comment->getObjectID()); + + if ($comment->hasEmbeddedObjects) { + MessageEmbeddedObjectManager::getInstance()->loadObjects( + 'com.woltlab.wcf.comment', + [$comment->getObjectID()] + ); + } + return [ 'actionName' => 'save', - 'message' => (new Comment($this->comment->commentID))->getFormattedMessage(), + 'message' => $comment->getFormattedMessage(), ]; } -- 2.20.1