Fix public URLs to Calendars

Fixes #3974
pull/232/head
Francis Lachapelle 2017-01-06 16:49:00 -05:00
parent abb1e1b447
commit 327ebf00a4
2 changed files with 4 additions and 7 deletions

1
NEWS
View File

@ -38,6 +38,7 @@ Bug fixes
- [web] handle semicolon in values during LDIF import (#1760) - [web] handle semicolon in values during LDIF import (#1760)
- [web] fixed computation of week number (#3973, #3976) - [web] fixed computation of week number (#3973, #3976)
- [web] fixed saving of inactive calendars (#3862, #3980) - [web] fixed saving of inactive calendars (#3862, #3980)
- [web] fixed public URLs to Calendars (#3974)
- [eas] properly skip folders we don't want to synchronize (#3943) - [eas] properly skip folders we don't want to synchronize (#3943)
- [eas] fixed 30 mins freebusy offset with S Planner - [eas] fixed 30 mins freebusy offset with S Planner
- [eas] now correctly handles reminders on tasks (#3964) - [eas] now correctly handles reminders on tasks (#3964)

View File

@ -475,9 +475,8 @@ static NSArray *childRecordFields = nil;
davURL = [self realDavURL]; davURL = [self realDavURL];
newPath = [NSMutableArray arrayWithArray: [[davURL path] componentsSeparatedByString: @"/"]]; newPath = [NSMutableArray arrayWithArray: [[davURL path] componentsSeparatedByString: @"/"]];
[newPath insertObject: @"public" atIndex: 3]; [newPath insertObject: @"public" atIndex: 3];
davURL = [[NSURL alloc] initWithScheme: [davURL scheme] davURL = [NSURL URLWithString: [newPath componentsJoinedByString: @"/"]
host: [davURL host] relativeToURL: davURL];
path: [newPath componentsJoinedByString: @"/"]];
return davURL; return davURL;
} }
@ -500,10 +499,7 @@ static NSArray *childRecordFields = nil;
[container nameInContainer], [container nameInContainer],
[self realNameInContainer]]; [self realNameInContainer]];
currentDavURL = [self davURL]; currentDavURL = [self davURL];
realDavURL = [[NSURL alloc] initWithScheme: [currentDavURL scheme] realDavURL = [NSURL URLWithString: path relativeToURL: currentDavURL];
host: [currentDavURL host]
path: path];
[realDavURL autorelease];
} }
else else
realDavURL = [self davURL]; realDavURL = [self davURL];