diff --git a/ChangeLog b/ChangeLog index d51c8b80b..bb687ed88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ * Reworked the UIxMailPartSignedViewer to inherit from UIxMailPartMixedViewer. + * UI/WebServerResources/SchedulerUI.js + We allow empty calendar imports. + * Avoid assumptions for .ics presence on URL + subscriptions. 2009-09-25 Ludovic Marcotte diff --git a/UI/Scheduler/UIxCalMainActions.m b/UI/Scheduler/UIxCalMainActions.m index 357787fa9..6cee2a8f6 100644 --- a/UI/Scheduler/UIxCalMainActions.m +++ b/UI/Scheduler/UIxCalMainActions.m @@ -91,7 +91,12 @@ tmp = [calendarURL lastPathComponent]; if (tmp) - rc = [tmp stringByDeletingSuffix: @".ics"]; + { + if ([[tmp pathExtension] caseInsensitiveCompare: @"ics"] == NSOrderedSame) + rc = [tmp substringToIndex: [tmp length] - 4]; + else + rc = tmp; + } else rc = [self labelForKey: @"Web Calendar"]; diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 4d6e6ba74..b3d3a8a57 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -1922,7 +1922,7 @@ function onCalendarWebAdd(event) { } function addWebCalendarCallback (http) { var data = http.responseText.evalJSON(true); - if (data.imported > 0) { + if (data.imported >= 0) { appendCalendar(data.displayname, "/" + data.name); refreshEvents(); refreshTasks();