From: Matthias Schmidt Date: Tue, 17 Jul 2012 16:22:51 +0000 (+0200) Subject: Immediately changes the interface language if the active user changes their language X-Git-Tag: 2.0.0_Beta_1~986^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8a3258f595f2b9d37ad247efb34d43a808c42903;p=GitHub%2FWoltLab%2FWCF.git Immediately changes the interface language if the active user changes their language --- diff --git a/wcfsetup/install/files/lib/data/user/UserAction.class.php b/wcfsetup/install/files/lib/data/user/UserAction.class.php index 682e40c5d3..58b532e2fa 100644 --- a/wcfsetup/install/files/lib/data/user/UserAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserAction.class.php @@ -151,6 +151,18 @@ class UserAction extends AbstractDatabaseObjectAction { public function update() { if (isset($this->parameters['data'])) { parent::update(); + + if (isset($this->parameters['data']['languageID'])) { + foreach ($this->objects as $object) { + if ($object->userID == WCF::getUser()->userID) { + if ($this->parameters['data']['languageID'] != WCF::getUser()->languageID) { + WCF::setLanguage($this->parameters['data']['languageID']); + } + + break; + } + } + } } else { if (!count($this->objects)) {