1 Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.h
2 ===================================================================
3 --- sope-gdl1/PostgreSQL/PostgreSQL72Channel.h (révision 1546)
4 +++ sope-gdl1/PostgreSQL/PostgreSQL72Channel.h (copie de travail)
6 #define ___PostgreSQL72_Channel_H___
8 #include <GDLAccess/EOAdaptorChannel.h>
9 +#include <GDLContentStore/EOAdaptorChannel+GCS.h>
12 @class NSArray, NSString, NSMutableDictionary;
15 } PostgreSQL72FieldInfo;
17 -@interface PostgreSQL72Channel : EOAdaptorChannel
18 +@interface PostgreSQL72Channel : EOAdaptorChannel <GCSEOAdaptorChannel>
20 // connection is valid after an openChannel call
21 PGConnection *connection;
22 Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.m
23 ===================================================================
24 --- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (révision 1546)
25 +++ sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (copie de travail)
30 +/* GCSEOAdaptorChannel protocol */
31 +static NSString *sqlFolderFormat = (@"CREATE TABLE %@ (\n" \
32 + @" c_name VARCHAR (256) NOT NULL,\n"
33 + @" c_content VARCHAR (100000) NOT NULL,\n"
34 + @" c_creationdate INT4 NOT NULL,\n"
35 + @" c_lastmodified INT4 NOT NULL,\n"
36 + @" c_version INT4 NOT NULL,\n"
37 + @" c_deleted INT4 NULL\n"
39 +static NSString *sqlFolderACLFormat = (@"CREATE TABLE %@ (\n" \
40 + @" c_uid VARCHAR (256) NOT NULL,\n"
41 + @" c_object VARCHAR (256) NOT NULL,\n"
42 + @" c_role VARCHAR (80) NOT NULL\n"
45 +- (NSException *) createGCSFolderTableWithName: (NSString *) tableName
49 + sql = [NSString stringWithFormat: sqlFolderFormat, tableName];
51 + return [self evaluateExpressionX: sql];
54 +- (NSException *) createGCSFolderACLTableWithName: (NSString *) tableName
58 + sql = [NSString stringWithFormat: sqlFolderACLFormat, tableName];
60 + return [self evaluateExpressionX: sql];
63 @end /* PostgreSQL72Channel */
65 @implementation PostgreSQL72Channel(PrimaryKeyGeneration)
66 Index: sope-mime/NGImap4/NGImap4Connection.m
67 ===================================================================
68 --- sope-mime/NGImap4/NGImap4Connection.m (révision 1546)
69 +++ sope-mime/NGImap4/NGImap4Connection.m (copie de travail)
72 if (debugCache) [self logWithFormat:@" no folders cached yet .."];
74 - result = [[self client] list:(onlyFetchInbox ? @"INBOX" : @"*")
75 + result = [[self client] list:(onlyFetchInbox ? @"INBOX" : @"")
77 if (![[result valueForKey:@"result"] boolValue]) {
78 [self errorWithFormat:@"Could not list mailbox hierarchy!"];
79 Index: sope-mime/NGImap4/NGImap4ResponseNormalizer.m
80 ===================================================================
81 --- sope-mime/NGImap4/NGImap4ResponseNormalizer.m (révision 1546)
82 +++ sope-mime/NGImap4/NGImap4ResponseNormalizer.m (copie de travail)
84 enumerator = [_flags objectEnumerator];
86 while ((obj = [enumerator nextObject])) {
87 - if (![obj isNotEmpty])
90 - if (![[obj substringToIndex:1] isEqualToString:@"\\"])
93 - objs[cnt] = [obj substringFromIndex:1];
95 + if ([obj isNotEmpty]) {
96 + if ([obj hasPrefix:@"\\"])
97 + objs[cnt] = [obj substringFromIndex:1];
103 result = [NSArray arrayWithObjects:objs count:cnt];
104 if (objs) free(objs);
105 Index: sope-mime/NGImap4/NGImap4ResponseParser.m
106 ===================================================================
107 --- sope-mime/NGImap4/NGImap4ResponseParser.m (révision 1546)
108 +++ sope-mime/NGImap4/NGImap4ResponseParser.m (copie de travail)
110 static NSDictionary *_parseMultipartBody(NGImap4ResponseParser *self,
111 BOOL isBodyStructure);
113 +static NSArray *_parseLanguages();
115 static NSString *_parseBodyString(NGImap4ResponseParser *self,
116 BOOL _convertString);
117 static NSString *_parseBodyDecodeString(NGImap4ResponseParser *self,
118 @@ -1627,6 +1629,29 @@
119 return _parseBodyDecodeString(self, _convertString, NO /* no decode */);
122 +static NSArray *_parseLanguages(NGImap4ResponseParser *self) {
123 + NSMutableArray *languages;
124 + NSString *language;
126 + languages = [NSMutableArray array];
127 + if (_la(self, 0) == '(') {
128 + while (_la(self, 0) != ')') {
130 + language = _parseBodyString(self, YES);
131 + if ([language length])
132 + [languages addObject: language];
137 + language = _parseBodyString(self, YES);
138 + if ([language length])
139 + [languages addObject: language];
145 static NSDictionary *_parseBodyParameterList(NGImap4ResponseParser *self)
147 NSMutableDictionary *list;
148 @@ -1734,10 +1759,11 @@
149 *encoding, *bodysize;
150 NSDictionary *parameterList;
151 NSMutableDictionary *dict;
152 + NSArray *languages;
154 type = [_parseBodyString(self, YES) lowercaseString];
155 _consumeIfMatch(self, ' ');
156 - subtype = _parseBodyString(self, YES);
157 + subtype = [_parseBodyString(self, YES) lowercaseString];
158 _consumeIfMatch(self, ' ');
159 parameterList = _parseBodyParameterList(self);
160 _consumeIfMatch(self, ' ');
161 @@ -1762,7 +1788,8 @@
162 _consumeIfMatch(self, ' ');
163 [dict setObject:_parseBodyString(self, YES) forKey:@"lines"];
165 - else if ([type isEqualToString:@"message"]) {
166 + else if ([type isEqualToString:@"message"]
167 + && [subtype isEqualToString:@"rfc822"]) {
168 if (_la(self, 0) != ')') {
169 _consumeIfMatch(self, ' ');
170 _consumeIfMatch(self, '(');
171 @@ -1805,14 +1832,9 @@
172 forKey: @"disposition"];
173 if (_la(self, 0) != ')') {
175 - if (_la(self, 0) == '(') {
176 - [dict setObject: _parseBodyParameterList(self)
177 - forKey: @"language"];
180 - [dict setObject: _parseBodyString(self, YES)
181 - forKey: @"language"];
183 + languages = _parseLanguages(self);
184 + if ([languages count])
185 + [dict setObject: languages forKey: @"languages"];
186 if (_la(self, 0) != ')') {
188 [dict setObject: _parseBodyString(self, YES)
189 @@ -1829,6 +1851,7 @@
190 static NSDictionary *_parseMultipartBody(NGImap4ResponseParser *self,
191 BOOL isBodyStructure) {
192 NSMutableArray *parts;
193 + NSArray *languages;
195 NSMutableDictionary *dict;
197 @@ -1854,14 +1877,9 @@
198 forKey: @"disposition"];
199 if (_la(self, 0) != ')') {
201 - if (_la(self, 0) == '(') {
202 - [dict setObject: _parseBodyParameterList(self)
203 - forKey: @"language"];
206 - [dict setObject: _parseBodyString(self, YES)
207 - forKey: @"language"];
209 + languages = _parseLanguages(self);
210 + if ([languages count])
211 + [dict setObject: languages forKey: @"languages"];
212 if (_la(self, 0) != ')') {
214 [dict setObject: _parseBodyString(self, YES)
215 Index: sope-mime/NGMime/NGMimeBodyPart.m
216 ===================================================================
217 --- sope-mime/NGMime/NGMimeBodyPart.m (révision 1546)
218 +++ sope-mime/NGMime/NGMimeBodyPart.m (copie de travail)
223 -static NGMimeType *defaultType = nil;
225 -+ (void)initialize {
226 - static BOOL isInitialized = NO;
227 - if (!isInitialized) {
228 - isInitialized = YES;
231 - [[NGMimeType mimeType:@"text/plain; charset=us-ascii"] retain];
235 + (id)bodyPartWithHeader:(NGHashMap *)_header {
236 return [[[self alloc] initWithHeader:_header] autorelease];
238 @@ -156,13 +144,12 @@
240 Fields = (NGMimeHeaderNames *)[NGMimePartParser headerFieldNames];
243 type = [self->header objectForKey:Fields->contentType];
245 if (![type isKindOfClass:[NGMimeType class]])
246 type = [NGMimeType mimeType:[type stringValue]];
248 - return (type != nil ? type : (id)defaultType);
252 - (NSString *)contentId {
253 Index: sope-mime/NGMime/NGMimeBodyParser.m
254 ===================================================================
255 --- sope-mime/NGMime/NGMimeBodyParser.m (révision 1546)
256 +++ sope-mime/NGMime/NGMimeBodyParser.m (copie de travail)
258 if (_data == nil) return nil;
260 ctype = [_part contentType];
263 + && [_d respondsToSelector: @selector(parser:contentTypeOfPart:)])
264 + ctype = [_d parser: self contentTypeOfPart: _part];
266 if (![ctype isKindOfClass:[NGMimeType class]])
267 ctype = [NGMimeType mimeType:[ctype stringValue]];
269 Index: sope-mime/NGMime/NGMimePartParser.h
270 ===================================================================
271 --- sope-mime/NGMime/NGMimePartParser.h (révision 1546)
272 +++ sope-mime/NGMime/NGMimePartParser.h (copie de travail)
274 BOOL parserParseRawBodyDataOfPart:1;
275 BOOL parserBodyParserForPart:1;
276 BOOL parserDecodeBodyOfPart:1;
277 + BOOL parserContentTypeOfPart:1;
278 } delegateRespondsTo;
282 - (id<NGMimeBodyParser>)parser:(NGMimePartParser *)_parser
283 bodyParserForPart:(id<NGMimePart>)_part;
285 +- (NGMimeType *)parser:(id)_parser
286 + contentTypeOfPart:(id<NGMimePart>)_part;
288 @end /* NSObject(NGMimePartParserDelegate) */
290 @interface NSObject(NGMimePartParser)
291 Index: sope-mime/NGMime/NGMimePartParser.m
292 ===================================================================
293 --- sope-mime/NGMime/NGMimePartParser.m (révision 1546)
294 +++ sope-mime/NGMime/NGMimePartParser.m (copie de travail)
295 @@ -1091,7 +1091,10 @@
296 id<NGMimeBodyParser> bodyParser = nil;
298 ctype = [_p contentType];
301 + && self->delegateRespondsTo.parserContentTypeOfPart)
302 + ctype = [self->delegate parser: self contentTypeOfPart: _p];
304 contentType = ([ctype isKindOfClass:[NGMimeType class]])
306 : [NGMimeType mimeType:[ctype stringValue]];
307 Index: sope-appserver/NGObjWeb/GNUmakefile.postamble
308 ===================================================================
309 --- sope-appserver/NGObjWeb/GNUmakefile.postamble (révision 1546)
310 +++ sope-appserver/NGObjWeb/GNUmakefile.postamble (copie de travail)
316 +after-install :: $(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/Additional/ngobjweb.make
318 +ifneq ($(GNUSTEP_MAKE_VERSION),1.3.0)
319 +after-install :: $(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/woapp.make $(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/wobundle.make
322 +$(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/Additional/ngobjweb.make: ngobjweb.make
323 $(MKDIRS) $(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/Additional/
324 $(INSTALL_DATA) ngobjweb.make $(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/Additional/ngobjweb.make
326 -ifneq ($(GNUSTEP_MAKE_VERSION),1.3.0)
328 +$(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/woapp.make: woapp-gs.make
329 $(INSTALL_DATA) woapp-gs.make \
330 $(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/woapp.make
332 +$(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/wobundle.make: wobundle-gs.make
333 $(INSTALL_DATA) wobundle-gs.make \
334 $(INSTALL_ROOT_DIR)/$(GNUSTEP_MAKEFILES)/wobundle.make
336 Index: sope-appserver/NGObjWeb/WOContext.m
337 ===================================================================
338 --- sope-appserver/NGObjWeb/WOContext.m (révision 1546)
339 +++ sope-appserver/NGObjWeb/WOContext.m (copie de travail)
341 static BOOL testNSURLs = NO;
342 static BOOL newCURLStyle = NO;
343 static NSString *WOApplicationSuffix = nil;
344 +static NSURL *redirectURL = nil;
347 static BOOL didInit = NO;
355 debugCursor = [ud boolForKey:@"WODebugCursor"] ? 1 : 0;
356 debugComponentAwake = [ud boolForKey:@"WODebugComponentAwake"];
357 WOApplicationSuffix = [[ud stringForKey:@"WOApplicationSuffix"] copy];
358 + url = [ud stringForKey:@"WOApplicationRedirectURL"];
360 + redirectURL = [NSURL URLWithString: url];
363 + (id)contextWithRequest:(WORequest *)_r {
369 + // Use URL from user defaults (WOApplicationRedirectURL)
370 + return redirectURL;
373 if ((serverURL = [rq headerForKey:@"x-webobjects-server-url"]) == nil) {
374 if ((host = [rq headerForKey:@"host"]))
375 serverURL = [@"http://" stringByAppendingString:host];
376 Index: sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m
377 ===================================================================
378 --- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m (révision 1546)
379 +++ sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m (copie de travail)
385 + if ((self->isAbsolute = OWGetProperty(_config, @"absolute"))) {
391 self->rest = _config;
393 Index: sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m
394 ===================================================================
395 --- sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m (révision 1546)
396 +++ sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m (copie de travail)
398 WOAssociation *string;
399 WOAssociation *target;
400 WOAssociation *disabled;
401 + WOAssociation *isAbsolute;
407 if ((self = [super initWithName:_name hyperlinkInfo:_info template:_t])) {
408 self->href = _info->href;
409 + self->isAbsolute = _info->isAbsolute;
414 // TODO: we need a binding to disable rewriting!
417 + if ([[self->isAbsolute valueInContext:_ctx] boolValue] == YES)
420 r = [_s rangeOfString:@":"];
423 Index: sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h
424 ===================================================================
425 --- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h (révision 1546)
426 +++ sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h (copie de travail)
428 WOAssociation *pageName;
429 WOAssociation *actionClass;
430 WOAssociation *directActionName;
432 + WOAssociation *isAbsolute;
436 /* 'ivar' associations */
437 Index: sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m
438 ===================================================================
439 --- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (révision 1546)
440 +++ sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (copie de travail)
442 #include <NGObjWeb/WOCookie.h>
443 #include <NGExtensions/NSData+gzip.h>
444 #include <NGHttp/NGHttp.h>
445 +#include <NGMime/NGMimeType.h>
449 @@ -1016,6 +1017,12 @@
450 - (void)parser:(NGMimePartParser *)_parser didParseHeader:(NGHashMap *)_header {
453 +- (NGMimeType *)parser:(id)_parser
454 + contentTypeOfPart:(id<NGMimePart>)_part
456 + return [NGMimeType mimeType: @"text/plain; charset=utf-8"];
459 @end /* WOHttpAdaptor */
461 @implementation WOCoreApplication(SimpleParserSelection)