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
This commit is contained in:
commit
8ee88b6a42
11
ChangeLog
11
ChangeLog
|
@ -3,6 +3,17 @@
|
||||||
* UI/Scheduler/UIxAppointmentEditor.m (-viewAction): added
|
* UI/Scheduler/UIxAppointmentEditor.m (-viewAction): added
|
||||||
calendar name in returned dictionary.
|
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>
|
2009-12-21 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
* SoObjects/SOGo/SOGoUserFolder.m (-fetchContentObjectNames):
|
* SoObjects/SOGo/SOGoUserFolder.m (-fetchContentObjectNames):
|
||||||
|
|
|
@ -1308,8 +1308,6 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||||
|
|
||||||
[r appendFormat: @"<D:response><D:href>"];
|
[r appendFormat: @"<D:response><D:href>"];
|
||||||
[r appendString: baseURL];
|
[r appendString: baseURL];
|
||||||
// if (![baseURL hasSuffix: @"/"])
|
|
||||||
// [r appendContentString: @"/"];
|
|
||||||
[r appendString: [object objectForKey: @"c_name"]];
|
[r appendString: [object objectForKey: @"c_name"]];
|
||||||
[r appendString: @"</D:href>"];
|
[r appendString: @"</D:href>"];
|
||||||
|
|
||||||
|
@ -1715,6 +1713,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||||
if ([currentField length])
|
if ([currentField length])
|
||||||
[fields addObjectUniquely: currentField];
|
[fields addObjectUniquely: currentField];
|
||||||
baseURL = [self davURLAsString];
|
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];
|
propertiesArray = [[properties allKeys] asPointersOfObjects];
|
||||||
propertiesCount = [properties count];
|
propertiesCount = [properties count];
|
||||||
|
@ -1934,6 +1935,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||||
NSEnumerator *addFields;
|
NSEnumerator *addFields;
|
||||||
|
|
||||||
baseURL = [self davURLAsString];
|
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];
|
urls = [NSMutableArray array];
|
||||||
max = [refs length];
|
max = [refs length];
|
||||||
|
|
|
@ -98,7 +98,8 @@
|
||||||
- (NSArray *) _davPersonalCalendarURL
|
- (NSArray *) _davPersonalCalendarURL
|
||||||
{
|
{
|
||||||
SOGoAppointmentFolders *parent;
|
SOGoAppointmentFolders *parent;
|
||||||
NSArray *tag, *parentURL;
|
NSArray *tag;
|
||||||
|
NSString *parentURL;
|
||||||
|
|
||||||
parent = [self privateCalendars: @"Calendar" inContext: context];
|
parent = [self privateCalendars: @"Calendar" inContext: context];
|
||||||
parentURL = [parent davURLAsString];
|
parentURL = [parent davURLAsString];
|
||||||
|
|
|
@ -1064,6 +1064,9 @@ static NSArray *childRecordFields = nil;
|
||||||
newToken = 0;
|
newToken = 0;
|
||||||
|
|
||||||
baseURL = [self davURLAsString];
|
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];
|
max = [records count];
|
||||||
syncResponses = [NSMutableArray arrayWithCapacity: max + 1];
|
syncResponses = [NSMutableArray arrayWithCapacity: max + 1];
|
||||||
|
|
|
@ -7,7 +7,7 @@ import webdavlib
|
||||||
|
|
||||||
class WebDAVTest(unittest.TestCase):
|
class WebDAVTest(unittest.TestCase):
|
||||||
def testPrincipalCollectionSet(self):
|
def testPrincipalCollectionSet(self):
|
||||||
"""property: principal-collection-set"""
|
"""property: 'principal-collection-set' on collection object"""
|
||||||
client = webdavlib.WebDAVClient(hostname, port, username, password)
|
client = webdavlib.WebDAVClient(hostname, port, username, password)
|
||||||
resource = '/SOGo/dav/%s/' % username
|
resource = '/SOGo/dav/%s/' % username
|
||||||
propfind = webdavlib.WebDAVPROPFIND(resource,
|
propfind = webdavlib.WebDAVPROPFIND(resource,
|
||||||
|
@ -29,7 +29,7 @@ class WebDAVTest(unittest.TestCase):
|
||||||
% ( responseHref, resource ))
|
% ( responseHref, resource ))
|
||||||
|
|
||||||
def testPrincipalCollectionSet2(self):
|
def testPrincipalCollectionSet2(self):
|
||||||
"""property: principal-collection-set"""
|
"""property: 'principal-collection-set' on non-collection object"""
|
||||||
client = webdavlib.WebDAVClient(hostname, port, username, password)
|
client = webdavlib.WebDAVClient(hostname, port, username, password)
|
||||||
resource = '/SOGo/dav/%s/freebusy.ifb' % username
|
resource = '/SOGo/dav/%s/freebusy.ifb' % username
|
||||||
propfind = webdavlib.WebDAVPROPFIND(resource,
|
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',
|
nodes = propfind.xpath_evaluate('/D:multistatus/D:response/D:propstat/D:prop/D:principal-collection-set/D:href',
|
||||||
None)
|
None)
|
||||||
responseHref = nodes[0].childNodes[0].nodeValue
|
responseHref = nodes[0].childNodes[0].nodeValue
|
||||||
|
expectedHref = '/SOGo/dav/%s/' % username
|
||||||
if responseHref[0:4] == "http":
|
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'"
|
"{DAV:}principal-collection-set returned %s instead of '%s'"
|
||||||
% ( responseHref, resource ))
|
% ( responseHref, expectedHref ))
|
||||||
else:
|
else:
|
||||||
self.assertEquals(resource, responseHref,
|
self.assertEquals(expectedHref, responseHref,
|
||||||
"{DAV:}principal-collection-set returned %s instead of '%s'"
|
"{DAV:}principal-collection-set returned %s instead of '%s'"
|
||||||
% ( responseHref, resource ))
|
% ( responseHref, expectedHref ))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in a new issue