From cb79bd0c89e21fefe6c6d0d01a340e2e5ff9413b Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 7 Dec 2010 16:07:54 +0100 Subject: [PATCH] Fix saving remote calendars. --- kronolith/lib/Ajax/Application.php | 3 ++- kronolith/lib/Kronolith.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kronolith/lib/Ajax/Application.php b/kronolith/lib/Ajax/Application.php index bcaa79fa8..e5ad1cf51 100644 --- a/kronolith/lib/Ajax/Application.php +++ b/kronolith/lib/Ajax/Application.php @@ -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; } diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index 832da7267..e8b400e3c 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -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.")); -- 2.11.0