From: wolfgang Date: Thu, 17 Apr 2008 17:26:17 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1399 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b54ee1cda64c67678a891c9214aec4aff8ed3322;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1399 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/ChangeLog b/ChangeLog index a96d48cb..243b773d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2008-04-15 Wolfgang Sourdeau + + * UI/MailPartViewers/UIxMailPartHTMLViewer.m + ([_UIxHTMLMailContentHandler -characters:_charslength:_len]) + ([_UIxHTMLMailContentHandler -comment:_charslength:_len]): don't + cast the unichar data to char, to avoid issues with endianness + which prevents the CSS from being parsed properly. + + * UI/MailerUI/UIxMailEditor.m ([UIxMailEditor -isMailReply]): new + method that returns the JS values "true" or "false" as strings is + the mail has a non-null count of recipients. + +2008-04-14 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoAppointmentFolder.m ([SOGoAppointmentFolder -davCalendarQuery:queryContext]) + ([SOGoAppointmentFolder -davCalendarMultiget:queryContext]): + deduce the cname of objects even if we are using hostless urls. + 2008-03-31 Wolfgang Sourdeau * UI/SOGoUI/SOGoACLAdvisory.m ([SOGoACLAdvisory -resourceName]): diff --git a/Main/SOGo.m b/Main/SOGo.m index afb19b09..f61c1466 100644 --- a/Main/SOGo.m +++ b/Main/SOGo.m @@ -392,6 +392,7 @@ static BOOL debugObjectAllocation = NO; static NSArray *runLoopModes = nil; WOResponse *resp; +// sleep (1); cache = [SOGoCache sharedCache]; resp = [super dispatchRequest: _request]; [SOGoCache killCache]; diff --git a/SOPE/sope-mime-nosort.diff b/SOPE/sope-mime-nosort.diff new file mode 100644 index 00000000..1ea4bf52 --- /dev/null +++ b/SOPE/sope-mime-nosort.diff @@ -0,0 +1,69 @@ +Index: sope-mime/NGImap4/NGImap4Client.m +=================================================================== +--- sope-mime/NGImap4/NGImap4Client.m (révision 1620) ++++ sope-mime/NGImap4/NGImap4Client.m (copie de travail) +@@ -1054,17 +1054,18 @@ + + if (![_encoding isNotNull]) _encoding = @"UTF-8"; + if (![_qualString isNotNull]) _qualString = @" ALL"; ++ ++ sortStr = @"FETCH 1:* UID"; ++// sortStr = [NSMutableString stringWithCapacity:128]; + +- sortStr = [NSMutableString stringWithCapacity:128]; ++// [sortStr appendString:@"UID SORT ("]; ++// if (_sort != nil) [sortStr appendString:_sort]; ++// [sortStr appendString:@") "]; + +- [sortStr appendString:@"UID SORT ("]; +- if (_sort != nil) [sortStr appendString:_sort]; +- [sortStr appendString:@") "]; ++// [sortStr appendString:_encoding]; /* eg 'UTF-8' */ + +- [sortStr appendString:_encoding]; /* eg 'UTF-8' */ +- + /* Note: this is _space sensitive_! to many spaces lead to error! */ +- [sortStr appendString:_qualString]; /* eg ' ALL' or ' TEXT "abc"' */ ++// [sortStr appendString:_qualString]; /* eg ' ALL' or ' TEXT "abc"' */ + + return [self->normer normalizeSortResponse:[self processCommand:sortStr]]; + } +Index: sope-mime/NGImap4/NGImap4Connection.m +=================================================================== +--- sope-mime/NGImap4/NGImap4Connection.m (révision 1620) ++++ sope-mime/NGImap4/NGImap4Connection.m (copie de travail) +@@ -456,7 +456,7 @@ + return nil; + } + +- uids = [result valueForKey:@"sort"]; ++ uids = [result valueForKey:@"fetch"]; + if (![uids isNotNull]) { + [self errorWithFormat:@"got no UIDs for URL: %@: %@", _url, result]; + return nil; +Index: sope-mime/NGImap4/NGImap4ResponseNormalizer.m +=================================================================== +--- sope-mime/NGImap4/NGImap4ResponseNormalizer.m (révision 1620) ++++ sope-mime/NGImap4/NGImap4ResponseNormalizer.m (copie de travail) +@@ -148,12 +148,18 @@ + /* filter for sort response (search : NSArray (msn)) */ + id obj; + NSMutableDictionary *result; ++ NSMutableArray *uids; ++ NSEnumerator *fetchEnum; + + result = [self normalizeResponse:_map]; ++ uids = [NSMutableArray array]; ++ ++ fetchEnum = [_map objectEnumeratorForKey:@"fetch"]; ++ while ((obj = [fetchEnum nextObject])) ++ [uids addObject: [obj objectForKey: @"uid"]]; + +- if ((obj = [[_map objectEnumeratorForKey:@"sort"] nextObject]) != nil) +- [result setObject:obj forKey:@"sort"]; +- ++ [result setObject: uids forKey:@"fetch"]; ++ + return result; + } + diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 7824aca9..b7760034 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -494,16 +494,29 @@ static NSNumber *sharedYes = nil; component = nil; realBaseURL = [NSURL URLWithString: baseURL]; - componentURL = [[NSURL URLWithString: url - relativeToURL: realBaseURL] - standardizedURL]; - componentURLPath = [componentURL absoluteString]; - if ([componentURLPath rangeOfString: [realBaseURL absoluteString]].location - != NSNotFound) + if (realBaseURL) /* url has a host part */ { - urlComponents = [componentURLPath componentsSeparatedByString: @"/"]; - cName = [urlComponents objectAtIndex: [urlComponents count] - 1]; - component = [NSDictionary dictionaryWithObject: cName forKey: @"c_name"]; + componentURL = [[NSURL URLWithString: url + relativeToURL: realBaseURL] + standardizedURL]; + componentURLPath = [componentURL absoluteString]; + if ([componentURLPath rangeOfString: [realBaseURL absoluteString]].location + != NSNotFound) + { + urlComponents = [componentURLPath componentsSeparatedByString: @"/"]; + cName = [urlComponents objectAtIndex: [urlComponents count] - 1]; + component = [NSDictionary dictionaryWithObject: cName forKey: @"c_name"]; + } + } + else + { + if ([url hasPrefix: baseURL]) + { + urlComponents = [[url stringByDeletingPrefix: baseURL] + componentsSeparatedByString: @"/"]; + cName = [urlComponents objectAtIndex: [urlComponents count] - 1]; + component = [NSDictionary dictionaryWithObject: cName forKey: @"c_name"]; + } } return component; diff --git a/SoObjects/Contacts/SOGoFolder+CardDAV.m b/SoObjects/Contacts/SOGoFolder+CardDAV.m index 8d2fb90e..bc2518a9 100644 --- a/SoObjects/Contacts/SOGoFolder+CardDAV.m +++ b/SoObjects/Contacts/SOGoFolder+CardDAV.m @@ -43,24 +43,22 @@ NSDictionary *currentFilter, *contact; NSEnumerator *contacts; NSString *baseURL; - SOGoObject *o; - o = (id ) self; - baseURL = [o baseURLInContext: localContext]; + baseURL = [self baseURLInContext: localContext]; max = [filters count]; for (count = 0; count < max; count++) { currentFilter = [filters objectAtIndex: count]; - contacts = [[o lookupContactsWithFilter: [[currentFilter allValues] lastObject] - sortBy: @"c_givenname" - ordering: NSOrderedDescending] + contacts = [[self lookupContactsWithFilter: [[currentFilter allValues] lastObject] + sortBy: @"c_givenname" + ordering: NSOrderedDescending] objectEnumerator]; while ((contact = [contacts nextObject])) - [o appendObject: contact - withBaseURL: baseURL - toREPORTResponse: response]; + [self appendObject: contact + withBaseURL: baseURL + toREPORTResponse: response]; } } diff --git a/UI/MailPartViewers/UIxMailPartHTMLViewer.m b/UI/MailPartViewers/UIxMailPartHTMLViewer.m index 94c7055d..9123ca86 100644 --- a/UI/MailPartViewers/UIxMailPartHTMLViewer.m +++ b/UI/MailPartViewers/UIxMailPartHTMLViewer.m @@ -171,7 +171,7 @@ currentChar = _chars + count; if (inCSSDeclaration) { - if (*(char *) currentChar == '}') + if (*currentChar == '}') { inCSSDeclaration = NO; hasEmbeddedCSS = NO; @@ -179,16 +179,16 @@ } else { - if (*(char *) currentChar == '{') + if (*currentChar == '{') inCSSDeclaration = YES; - if (*(char *) currentChar == ',') + if (*currentChar == ',') hasEmbeddedCSS = NO; else if (!hasEmbeddedCSS) { - if (*(char *) currentChar == '@') + if (*currentChar == '@') hasEmbeddedCSS = YES; else - if (*(char *) currentChar > 32) + if (*currentChar > 32) { [css appendString: [NSString stringWithCharacters: start length: (currentChar - start)]]; diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index 18e2bd8a..39d7f984 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -121,6 +121,10 @@ static NSArray *infoKeys = nil; } /* accessors */ +- (NSString *) isMailReply +{ + return ([to count] > 0 ? @"true" : @"false"); +} - (void) setFrom: (NSString *) newFrom { diff --git a/UI/Templates/MailerUI/UIxMailEditor.wox b/UI/Templates/MailerUI/UIxMailEditor.wox index abda2830..7753c0b3 100644 --- a/UI/Templates/MailerUI/UIxMailEditor.wox +++ b/UI/Templates/MailerUI/UIxMailEditor.wox @@ -11,6 +11,9 @@ title="panelTitle" const:popup="YES" const:jsFiles="UIxMailToSelection.js"> +