From: Matthias Schmidt Date: Thu, 10 Jun 2021 05:52:01 +0000 (+0200) Subject: Show embedded objects after editing comments X-Git-Tag: 5.5.0_Alpha_1~667 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9d155f1f3e604f91f31d9a17dca0a0e998c3d8bc;p=GitHub%2FWoltLab%2FWCF.git Show embedded objects after editing comments --- 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(), ]; }