From: Michael J. Rubinsky Date: Wed, 2 Sep 2009 15:52:31 +0000 (-0400) Subject: Don't blindly update the user prefs for display_calendars. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=6dc6d2e8cfdf9b9f03d0bea9afdc6b4cfab78715;p=horde.git 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. --- 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'])); + } }