mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
PreferenceForm: Detect client changes based on current session
not based on the stored preferences. The session is more up2date. refs #4417
This commit is contained in:
parent
ed6d5f4958
commit
df49f0c241
@ -93,12 +93,13 @@ class PreferenceForm extends Form
|
|||||||
*/
|
*/
|
||||||
public function onSuccess()
|
public function onSuccess()
|
||||||
{
|
{
|
||||||
$this->preferences = new Preferences($this->store ? $this->store->load() : array());
|
$currentPreferences = $this->Auth()->getUser()->getPreferences();
|
||||||
$oldTheme = $this->preferences->getValue('icingaweb', 'theme');
|
$oldTheme = $currentPreferences->getValue('icingaweb', 'theme');
|
||||||
$oldMode = $this->preferences->getValue('icingaweb', 'theme_mode');
|
$oldMode = $currentPreferences->getValue('icingaweb', 'theme_mode');
|
||||||
$oldLocale = $this->preferences->getValue('icingaweb', 'language');
|
$oldLocale = $currentPreferences->getValue('icingaweb', 'language');
|
||||||
$defaultTheme = Config::app()->get('themes', 'default', StyleSheet::DEFAULT_THEME);
|
$defaultTheme = Config::app()->get('themes', 'default', StyleSheet::DEFAULT_THEME);
|
||||||
|
|
||||||
|
$this->preferences = new Preferences($this->store ? $this->store->load() : array());
|
||||||
$webPreferences = $this->preferences->get('icingaweb', array());
|
$webPreferences = $this->preferences->get('icingaweb', array());
|
||||||
foreach ($this->getValues() as $key => $value) {
|
foreach ($this->getValues() as $key => $value) {
|
||||||
if ($value === ''
|
if ($value === ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user