From 167679d2c3f7c396d932c00ebb5368cda059da68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 15 Oct 2012 12:15:56 +0200 Subject: [PATCH] Update updatescript as well --- file/acp/be.bastelstu.wcf.chat.update.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/file/acp/be.bastelstu.wcf.chat.update.php b/file/acp/be.bastelstu.wcf.chat.update.php index 4f7504b..d99b0a9 100644 --- a/file/acp/be.bastelstu.wcf.chat.update.php +++ b/file/acp/be.bastelstu.wcf.chat.update.php @@ -17,12 +17,21 @@ final class Update { */ private $rooms = null; + /** + * Contains all the styles the current installation has. + * + * @var array<\wcf\data\style\Style> + */ + private $styles = null; + public function __construct() { $this->rooms = \wcf\data\chat\room\ChatRoom::getCache(); + $this->styles = \wcf\system\style\StyleHandler::getInstance()->getAvailableStyles(); } /** * Notifies users to refresh the chat as the JS may no longer be fully compatible with the PHP code. + * Resets styles. */ public function execute() { foreach ($this->rooms as $room) { @@ -37,6 +46,10 @@ public function execute() { )); $messageAction->executeAction(); } + + foreach ($this->styles as $style) { + \wcf\system\style\StyleHandler::getInstance()->resetStylesheet($style); + } } } $update = new Update();