merge of '2c0e8a6a410ecb7bc3984b724b271bf6bbdb8947'

and '6f84a669db2d05b99c1720fe9558575f53130156'

Monotone-Parent: 2c0e8a6a410ecb7bc3984b724b271bf6bbdb8947
Monotone-Parent: 6f84a669db2d05b99c1720fe9558575f53130156
Monotone-Revision: 15a323395e06e9dba494ab7c7ad2871d2e95bdd4

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-12-22T21:07:40
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2009-12-22 21:07:40 +00:00
commit 8ee88b6a42
5 changed files with 29 additions and 9 deletions

View File

@ -3,6 +3,17 @@
* UI/Scheduler/UIxAppointmentEditor.m (-viewAction): added
calendar name in returned dictionary.
2009-12-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Tests/test-webdav.py (WebDAVTest.testPrincipalCollectionSet2):
fixed test to use the proper collection URL as expected value,
rather that the freebusy.ifb resource URL.
* SoObjects/Appointments/SOGoAppointmentFolder.m
(_appendComponentProperties:matchingFilters:toResponse:)
(_appendComponentProperties:matchingURLs:toResponse:): ensure that
baseURL ends with "/".
2009-12-21 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoUserFolder.m (-fetchContentObjectNames):

View File

@ -1308,8 +1308,6 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
[r appendFormat: @"<D:response><D:href>"];
[r appendString: baseURL];
// if (![baseURL hasSuffix: @"/"])
// [r appendContentString: @"/"];
[r appendString: [object objectForKey: @"c_name"]];
[r appendString: @"</D:href>"];
@ -1715,6 +1713,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
if ([currentField length])
[fields addObjectUniquely: currentField];
baseURL = [self davURLAsString];
#warning review this when fixing http://www.scalableogo.org/bugs/view.php?id=276
if (![baseURL hasSuffix: @"/"])
baseURL = [NSString stringWithFormat: @"%@/", baseURL];
propertiesArray = [[properties allKeys] asPointersOfObjects];
propertiesCount = [properties count];
@ -1934,6 +1935,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
NSEnumerator *addFields;
baseURL = [self davURLAsString];
#warning review this when fixing http://www.scalableogo.org/bugs/view.php?id=276
if (![baseURL hasSuffix: @"/"])
baseURL = [NSString stringWithFormat: @"%@/", baseURL];
urls = [NSMutableArray array];
max = [refs length];

View File

@ -98,7 +98,8 @@
- (NSArray *) _davPersonalCalendarURL
{
SOGoAppointmentFolders *parent;
NSArray *tag, *parentURL;
NSArray *tag;
NSString *parentURL;
parent = [self privateCalendars: @"Calendar" inContext: context];
parentURL = [parent davURLAsString];

View File

@ -1064,6 +1064,9 @@ static NSArray *childRecordFields = nil;
newToken = 0;
baseURL = [self davURLAsString];
#warning review this when fixing http://www.scalableogo.org/bugs/view.php?id=276
if (![baseURL hasSuffix: @"/"])
baseURL = [NSString stringWithFormat: @"%@/", baseURL];
max = [records count];
syncResponses = [NSMutableArray arrayWithCapacity: max + 1];

View File

@ -7,7 +7,7 @@ import webdavlib
class WebDAVTest(unittest.TestCase):
def testPrincipalCollectionSet(self):
"""property: principal-collection-set"""
"""property: 'principal-collection-set' on collection object"""
client = webdavlib.WebDAVClient(hostname, port, username, password)
resource = '/SOGo/dav/%s/' % username
propfind = webdavlib.WebDAVPROPFIND(resource,
@ -29,7 +29,7 @@ class WebDAVTest(unittest.TestCase):
% ( responseHref, resource ))
def testPrincipalCollectionSet2(self):
"""property: principal-collection-set"""
"""property: 'principal-collection-set' on non-collection object"""
client = webdavlib.WebDAVClient(hostname, port, username, password)
resource = '/SOGo/dav/%s/freebusy.ifb' % username
propfind = webdavlib.WebDAVPROPFIND(resource,
@ -41,14 +41,15 @@ class WebDAVTest(unittest.TestCase):
nodes = propfind.xpath_evaluate('/D:multistatus/D:response/D:propstat/D:prop/D:principal-collection-set/D:href',
None)
responseHref = nodes[0].childNodes[0].nodeValue
expectedHref = '/SOGo/dav/%s/' % username
if responseHref[0:4] == "http":
self.assertEquals("http://%s%s" % (hostname, resource), responseHref,
self.assertEquals("http://%s%s" % (hostname, expectedHref), responseHref,
"{DAV:}principal-collection-set returned %s instead of '%s'"
% ( responseHref, resource ))
% ( responseHref, expectedHref ))
else:
self.assertEquals(resource, responseHref,
self.assertEquals(expectedHref, responseHref,
"{DAV:}principal-collection-set returned %s instead of '%s'"
% ( responseHref, resource ))
% ( responseHref, expectedHref ))
if __name__ == "__main__":
unittest.main()