Make sure if we pass a display_cal parameter, that ONLY those calendars are displayed.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 2 Sep 2009 15:57:39 +0000 (11:57 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 2 Sep 2009 15:59:07 +0000 (11:59 -0400)
kronolith/lib/Kronolith.php

index 1666cff..d0089f8 100644 (file)
@@ -697,10 +697,11 @@ class Kronolith
          * user doesn't have any selected calendars to view then fall
          * back to an available calendar. */
         if (($calendarId = Horde_Util::getFormData('display_cal')) !== null) {
+            $GLOBALS['display_calendars'] = array();
+            $GLOBALS['display_remote_calendars'] = array();
+            $GLOBALS['display_external_calendars'] = array();
             if (is_array($calendarId)) {
                 $calendars = $calendarId;
-                $GLOBALS['display_calendars'] = array();
-                $GLOBALS['display_remote_calendars'] = array();
                 foreach ($calendars as $calendarId) {
                     if (strncmp($calendarId, 'remote_', 7) === 0) {
                         $calendarId = substr($calendarId, 7);