mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-02 20:19:27 +01:00
fix default-alarm(s) in calendar could not be removed:
- et2-date-duration with emptyNot0 attribute set, was still regarding "" as 0 - preferences class was not recognising change from 0.0 to "" (Array comparison with == vs. array_diff_assoc()) - preferences_settings was not updating $GLOBALS[egw_info][user][preferences], which was used in calendar settings hook
This commit is contained in:
parent
2ddfb6a596
commit
c4541f75a2
@ -359,7 +359,7 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement)
|
|||||||
|
|
||||||
set value(_value)
|
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();
|
this.requestUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -891,7 +891,7 @@ class Preferences
|
|||||||
foreach($prefs as $app => $value)
|
foreach($prefs as $app => $value)
|
||||||
{
|
{
|
||||||
// check if app preferences have changed, if not no need to save them
|
// 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();
|
if (!$changed++) $this->db->transaction_begin();
|
||||||
|
|
||||||
@ -1051,4 +1051,4 @@ class Preferences
|
|||||||
}
|
}
|
||||||
return $all_settings;
|
return $all_settings;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -401,6 +401,11 @@ class preferences_settings
|
|||||||
{
|
{
|
||||||
Egw::invalidate_session_cache();
|
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;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user