Only update the pref if we explicitly pass a toggle_calendar or if we
are creating the user's first share.
$GLOBALS['display_calendars'][] = $calendarId;
}
}
+
+ $GLOBALS['prefs']->setValue('display_cals', serialize($GLOBALS['display_calendars']));
}
/* Make sure all shares exists now to save on checking later. */
$GLOBALS['notification']->push(sprintf(_("New calendar created and automatically shared with the following group(s): %s."), implode(', ', $group_list)), 'horde.success');
}
}
- }
- $GLOBALS['prefs']->setValue('display_cals', serialize($GLOBALS['display_calendars']));
+ $GLOBALS['prefs']->setValue('display_cals', serialize($GLOBALS['display_calendars']));
+ }
}