Fix saving remote calendars.
authorJan Schneider <jan@horde.org>
Tue, 7 Dec 2010 15:07:54 +0000 (16:07 +0100)
committerJan Schneider <jan@horde.org>
Tue, 7 Dec 2010 15:07:54 +0000 (16:07 +0100)
kronolith/lib/Ajax/Application.php
kronolith/lib/Kronolith.php

index bcaa79f..e5ad1cf 100644 (file)
@@ -752,8 +752,9 @@ class Kronolith_Ajax_Application extends Horde_Core_Ajax_Application
                 $GLOBALS['notification']->push(sprintf(_("You have been subscribed to \"%s\" (%s)."), $calendar['name'], $calendar['url']), 'horde.success');
                 $result->id = $calendar['url'];
             }
+            $wrapper = new Kronolith_Calendar_Remote($calendar);
             $result->saved = true;
-            $result->color = Kronolith::foregroundColor($calendar);
+            $result->calendar = $wrapper->toHash();
             break;
         }
 
index 832da72..e8b400e 100644 (file)
@@ -1957,7 +1957,7 @@ class Kronolith
      *
      * @throws Kronolith_Exception
      */
-    public static function subscribeRemoteCalendar($info, $update = false)
+    public static function subscribeRemoteCalendar(&$info, $update = false)
     {
         if (!(strlen($info['name']) && strlen($info['url']))) {
             throw new Kronolith_Exception(_("You must specify a name and a URL."));