Calendar - add update to deal with birthdays_as_events preference staying at FALSE for all users

This commit is contained in:
nathangray 2018-04-03 10:52:42 -06:00 committed by Ralf Becker
parent 490742ea51
commit 5f86bd4098
2 changed files with 11 additions and 1 deletions

View File

@ -10,7 +10,7 @@
*/
$setup_info['calendar']['name'] = 'calendar';
$setup_info['calendar']['version'] = '17.1';
$setup_info['calendar']['version'] = '17.1.001';
$setup_info['calendar']['app_order'] = 3;
$setup_info['calendar']['enable'] = 1;
$setup_info['calendar']['index'] = 'calendar.calendar_uiviews.index&ajax=true';

View File

@ -2754,3 +2754,13 @@ function calendar_upgrade16_1_003()
{
return $GLOBALS['setup_info']['calendar']['currentver'] = '17.1';
}
function calendar_upgrade17_1()
{
// Update birthdays as events preference from boolean
$change = function($attr, $old_value, $owner) {
return $old_value ? 'birthday' : '0';
};
Api\Preferences::change_preference('calendar', 'birthdays_as_events', $change);
return $GLOBALS['setup_info']['calendar']['currentver'] = '17.1.001';
}