diff --git a/api/js/etemplate/Et2Date/Et2DateDuration.ts b/api/js/etemplate/Et2Date/Et2DateDuration.ts index 9d97b536f5..0bdc822e39 100644 --- a/api/js/etemplate/Et2Date/Et2DateDuration.ts +++ b/api/js/etemplate/Et2Date/Et2DateDuration.ts @@ -359,7 +359,7 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement) set value(_value) { - this._display = this._convert_to_display(_value == "" ? 0 : parseFloat(_value)); + this._display = this._convert_to_display(this.emptyNot0 && ""+_value === "" ? '' : parseFloat(_value)); this.requestUpdate(); } diff --git a/api/src/Preferences.php b/api/src/Preferences.php index b8752e08a9..93b31c2fd0 100644 --- a/api/src/Preferences.php +++ b/api/src/Preferences.php @@ -891,7 +891,7 @@ class Preferences foreach($prefs as $app => $value) { // check if app preferences have changed, if not no need to save them - if ($old_prefs && $old_prefs[$app] == $value) continue; + if ($old_prefs && !array_diff_assoc($old_prefs[$app], $value)) continue; if (!$changed++) $this->db->transaction_begin(); @@ -1051,4 +1051,4 @@ class Preferences } return $all_settings; } -} +} \ No newline at end of file diff --git a/preferences/inc/class.preferences_settings.inc.php b/preferences/inc/class.preferences_settings.inc.php index 49705e5c92..704352d7e6 100644 --- a/preferences/inc/class.preferences_settings.inc.php +++ b/preferences/inc/class.preferences_settings.inc.php @@ -401,6 +401,11 @@ class preferences_settings { Egw::invalidate_session_cache(); } + // update $GLOBALS['egw_info']['user']['preferences'] as some hooks called use that can return or set old values (e.g. calendar default-alarm(-wholeday)) + if ($type === 'user' && $GLOBALS['egw']->preferences->get_account_id() == $GLOBALS['egw_info']['user']['account_id']) + { + $GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->data; + } } return null;