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:
parent
726a4071d1
commit
167679d2c3
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user