Skip to content

Commit

Permalink
Fix public URLs to Calendars
Browse files Browse the repository at this point in the history
Fixes #3974
  • Loading branch information
cgx committed Jan 6, 2017
1 parent abb1e1b commit 327ebf0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -38,6 +38,7 @@ Bug fixes
- [web] handle semicolon in values during LDIF import (#1760)
- [web] fixed computation of week number (#3973, #3976)
- [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] fixed 30 mins freebusy offset with S Planner
- [eas] now correctly handles reminders on tasks (#3964)
Expand Down
10 changes: 3 additions & 7 deletions SoObjects/SOGo/SOGoGCSFolder.m
Expand Up @@ -475,9 +475,8 @@ - (NSURL *) publicDavURL
davURL = [self realDavURL];
newPath = [NSMutableArray arrayWithArray: [[davURL path] componentsSeparatedByString: @"/"]];
[newPath insertObject: @"public" atIndex: 3];
davURL = [[NSURL alloc] initWithScheme: [davURL scheme]
host: [davURL host]
path: [newPath componentsJoinedByString: @"/"]];
davURL = [NSURL URLWithString: [newPath componentsJoinedByString: @"/"]
relativeToURL: davURL];

return davURL;
}
Expand All @@ -500,10 +499,7 @@ - (NSURL *) realDavURL
[container nameInContainer],
[self realNameInContainer]];
currentDavURL = [self davURL];
realDavURL = [[NSURL alloc] initWithScheme: [currentDavURL scheme]
host: [currentDavURL host]
path: path];
[realDavURL autorelease];
realDavURL = [NSURL URLWithString: path relativeToURL: currentDavURL];
}
else
realDavURL = [self davURL];
Expand Down

0 comments on commit 327ebf0

Please sign in to comment.