From 6dc6d2e8cfdf9b9f03d0bea9afdc6b4cfab78715 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Wed, 2 Sep 2009 11:52:31 -0400 Subject: [PATCH] Don't blindly update the user prefs for display_calendars. Only update the pref if we explicitly pass a toggle_calendar or if we are creating the user's first share. --- kronolith/lib/Kronolith.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index 5c1b619fb..1666cffec 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -760,6 +760,8 @@ class Kronolith $GLOBALS['display_calendars'][] = $calendarId; } } + + $GLOBALS['prefs']->setValue('display_cals', serialize($GLOBALS['display_calendars'])); } /* Make sure all shares exists now to save on checking later. */ @@ -875,9 +877,9 @@ class Kronolith $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'])); + } } -- 2.11.0