Remove dates stored in favorites

This commit is contained in:
Nathan Gray 2015-11-24 16:38:04 +00:00
parent 3373d16c71
commit e9e6d8f5ab
2 changed files with 18 additions and 1 deletions

View File

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

View File

@ -2662,3 +2662,20 @@ function calendar_upgrade14_3_900()
}
return $GLOBALS['setup_info']['calendar']['currentver'] = '14.3.901';
}
/**
* Remove dates from favorites
*
* @return string New version number
*/
function calendar_upgrade14_3_901()
{
preferences::change_preference('calendar', '/^favorite_/', function($attr, $old_value, $owner) {
if($old_value['state'])
{
unset($old_value['state']['date']);
}
return $old_value;
});
return $GLOBALS['setup_info']['calendar']['currentver'] = '14.3.902';
}