From 94c23e709aa49de48560160cb3a42ce233e9ef14 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 14 Feb 2024 20:14:46 +0200 Subject: [PATCH] Revert "fix default-alarm(s) in calendar could not be removed:" As it breaks setting most personal preferences :( This reverts commit 6e981cf0c1e4ac2d08dc04f15d0b66f89227a13a. --- api/js/etemplate/Et2Date/Et2DateDuration.ts | 2 +- api/src/Preferences.php | 4 ++-- preferences/inc/class.preferences_settings.inc.php | 5 ----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/api/js/etemplate/Et2Date/Et2DateDuration.ts b/api/js/etemplate/Et2Date/Et2DateDuration.ts index 0bdc822e39..9d97b536f5 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(this.emptyNot0 && ""+_value === "" ? '' : parseFloat(_value)); + this._display = this._convert_to_display(_value == "" ? 0 : parseFloat(_value)); this.requestUpdate(); } diff --git a/api/src/Preferences.php b/api/src/Preferences.php index 93b31c2fd0..b8752e08a9 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 && !array_diff_assoc($old_prefs[$app], $value)) continue; + if ($old_prefs && $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 704352d7e6..49705e5c92 100644 --- a/preferences/inc/class.preferences_settings.inc.php +++ b/preferences/inc/class.preferences_settings.inc.php @@ -401,11 +401,6 @@ 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;