From 701cba1bd001f09e6b2935523e37fa04820338bc Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 16 Sep 2023 12:22:42 +0200 Subject: [PATCH] Refresh the internal data of cached reactions See https://www.woltlab.com/community/thread/301627-when-changing-the-reaction-image-the-file-is-not-updated-in-the-dashboard/ --- .../lib/data/reaction/type/ReactionType.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wcfsetup/install/files/lib/data/reaction/type/ReactionType.class.php b/wcfsetup/install/files/lib/data/reaction/type/ReactionType.class.php index b5a6f94c66..125c2df776 100644 --- a/wcfsetup/install/files/lib/data/reaction/type/ReactionType.class.php +++ b/wcfsetup/install/files/lib/data/reaction/type/ReactionType.class.php @@ -4,6 +4,7 @@ namespace wcf\data\reaction\type; use wcf\data\DatabaseObject; use wcf\data\ITitledObject; +use wcf\system\reaction\ReactionHandler; use wcf\system\WCF; /** @@ -27,6 +28,18 @@ class ReactionType extends DatabaseObject implements ITitledObject */ protected static $databaseTableIndexName = 'reactionTypeID'; + /** + * @inheritDoc + */ + public function __wakeup() + { + $reaction = ReactionHandler::getInstance()->getReactionTypeByID($this->reactionTypeID); + if ($reaction) { + $this->title = $reaction->title; + $this->iconFile = $reaction->iconFile; + } + } + /** * @inheritDoc */ -- 2.20.1