"stop calendar to update prefs on each request (do it only on change)"

This commit is contained in:
Ralf Becker 2009-10-12 09:34:56 +00:00
parent 7ad5e22305
commit e3c468361d

View File

@ -381,9 +381,12 @@ class calendar_ui
// save defined states into the user-prefs // save defined states into the user-prefs
if(!empty($states) && is_array($states)) if(!empty($states) && is_array($states))
{ {
$saved_states = array_intersect_key($states,array_flip($this->states_to_save)); $saved_states = serialize(array_intersect_key($states,array_flip($this->states_to_save)));
$GLOBALS['egw']->preferences->add('calendar','saved_states',serialize($saved_states)); if ($saved_states != $this->cal_prefs['saved_states'])
$GLOBALS['egw']->preferences->save_repository(false,'user',false); {
$GLOBALS['egw']->preferences->add('calendar','saved_states',$saved_states);
$GLOBALS['egw']->preferences->save_repository(false,'user',false);
}
} }
} }