Reapply "fix default-alarm(s) in calendar could not be removed:"

This reverts commit 94c23e709a.
This commit is contained in:
ralf 2024-02-15 20:29:57 +02:00
parent ee7dc17b4b
commit 24d19ec8c1
3 changed files with 8 additions and 3 deletions

View File

@ -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();
}

View File

@ -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;
}
}
}

View File

@ -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;