1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Update updatescript as well

This commit is contained in:
Tim Düsterhus 2012-10-15 12:15:56 +02:00
parent 726a4071d1
commit 167679d2c3

View File

@ -17,12 +17,21 @@ final class Update {
*/ */
private $rooms = null; private $rooms = null;
/**
* Contains all the styles the current installation has.
*
* @var array<\wcf\data\style\Style>
*/
private $styles = null;
public function __construct() { public function __construct() {
$this->rooms = \wcf\data\chat\room\ChatRoom::getCache(); $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. * Notifies users to refresh the chat as the JS may no longer be fully compatible with the PHP code.
* Resets styles.
*/ */
public function execute() { public function execute() {
foreach ($this->rooms as $room) { foreach ($this->rooms as $room) {
@ -37,6 +46,10 @@ public function execute() {
)); ));
$messageAction->executeAction(); $messageAction->executeAction();
} }
foreach ($this->styles as $style) {
\wcf\system\style\StyleHandler::getInstance()->resetStylesheet($style);
}
} }
} }
$update = new Update(); $update = new Update();