Use correct key when creating first share.
authorJan Schneider <jan@horde.org>
Tue, 18 Jan 2011 18:26:13 +0000 (19:26 +0100)
committerJan Schneider <jan@horde.org>
Tue, 18 Jan 2011 23:12:55 +0000 (00:12 +0100)
kronolith/lib/Kronolith.php

index 383a8bb..670b5e6 100644 (file)
@@ -1122,7 +1122,7 @@ class Kronolith
             $share = $GLOBALS['kronolith_shares']->newShare($GLOBALS['registry']->getAuth(), strval(new Horde_Support_Randomid()));
             $share->set('name', sprintf(_("Calendar of %s"), $identity->getName()));
             $GLOBALS['kronolith_shares']->addShare($share);
-            $GLOBALS['all_calendars'][$GLOBALS['registry']->getAuth()] = new Kronolith_Calendar_Internal(array('share' => $share));
+            $GLOBALS['all_calendars'][$share->getName()] = new Kronolith_Calendar_Internal(array('share' => $share));
             $GLOBALS['display_calendars'][] = $share->getName();
 
             /* Calendar auto-sharing with the user's groups */