2004-10-22 Marcus Mueller <znek@mulle-kybernetik.com>
+ * WOElement.m: queryParameters override keys from queryDictionary in
+ case of conflicts (v4.3.72)
+
* WOElement.m: if both queryDictionary and queryParameters were set on
- an element, the '?' seperator wasn't rendered when it should in fact
+ an element, the '&' seperator wasn't rendered when it should in fact
(v4.3.71)
2004-10-22 Helge Hess <helge.hess@opengroupware.org>
NSString *value;
BOOL isFirst;
WOComponent *sComponent;
+ NSArray *paraKeys;
if ((_queryDict == nil) && (_paras == nil))
return nil;
str = [NSMutableString stringWithCapacity:128];
sComponent = [_ctx component];
- keys = [_queryDict keyEnumerator];
isFirst = YES;
+ paraKeys = [_paras allKeys];
+
+ /* ?style parameters */
+
+ keys = [_paras keyEnumerator];
while ((key = [keys nextObject])) {
- value = [[_queryDict objectForKey:key] stringValue];
+ value = [[_paras objectForKey:key] stringValueInComponent:sComponent];
value = value ? [value stringByEscapingURL] : @"";
key = key ? [key stringByEscapingURL] : @"";
-
+
if (isFirst) isFirst = NO;
else [str appendString:@"&"];
-
+
[str appendString:key];
[str appendString:@"="];
[str appendString:value];
}
-
- /* ?style parameters */
- keys = [_paras keyEnumerator];
- while ((key = [keys nextObject])) {
- value = [[_paras objectForKey:key] stringValueInComponent:sComponent];
+ keys = [_queryDict keyEnumerator];
+ while ((key = [keys nextObject]) && (![paraKeys containsObject:key])) {
+ value = [[_queryDict objectForKey:key] stringValue];
value = value ? [value stringByEscapingURL] : @"";
key = key ? [key stringByEscapingURL] : @"";