Fixed crashes with IE7+8
Monotone-Parent: 33b6c38a250d6ae49e26dd7de548708c132d5c34 Monotone-Revision: 95ed8a2f8950868651d78738a3745fb83e43881a Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-03T18:24:05 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
45420d434c
commit
207fff0117
|
@ -231,7 +231,7 @@
|
|||
{
|
||||
WORequest *request;
|
||||
WOResponse *response;
|
||||
NSData *data;
|
||||
id data;
|
||||
NSMutableDictionary *rc;
|
||||
NSString *fileContent;
|
||||
int imported = 0;
|
||||
|
@ -239,10 +239,15 @@
|
|||
|
||||
request = [context request];
|
||||
rc = [NSMutableDictionary dictionary];
|
||||
data = (NSData *)[request formValueForKey: @"contactsFile"];
|
||||
fileContent = [[NSString alloc] initWithData: data
|
||||
encoding: NSUTF8StringEncoding];
|
||||
[fileContent autorelease];
|
||||
data = [request formValueForKey: @"contactsFile"];
|
||||
if ([data respondsToSelector: @selector(isEqualToString:)])
|
||||
fileContent = (NSString *) data;
|
||||
else
|
||||
{
|
||||
fileContent = [[NSString alloc] initWithData: (NSData *) data
|
||||
encoding: NSUTF8StringEncoding];
|
||||
[fileContent autorelease];
|
||||
}
|
||||
|
||||
if (fileContent && [fileContent length])
|
||||
{
|
||||
|
@ -265,6 +270,8 @@
|
|||
forKey: @"message"];
|
||||
|
||||
response = [self responseWithStatus: 200];
|
||||
[response setHeader: @"text/html"
|
||||
forKey: @"content-type"];
|
||||
[(WOResponse*)response appendContentString: [rc jsonRepresentation]];
|
||||
|
||||
return response;
|
||||
|
|
|
@ -707,7 +707,7 @@ static BOOL shouldDisplayWeekend = NO;
|
|||
WORequest *request;
|
||||
WOResponse *response;
|
||||
NSString *fileContent;
|
||||
NSData *data;
|
||||
id data;
|
||||
iCalCalendar *additions;
|
||||
int i, count, imported;
|
||||
|
||||
|
@ -715,9 +715,15 @@ static BOOL shouldDisplayWeekend = NO;
|
|||
rc = [NSMutableDictionary dictionary];
|
||||
request = [context request];
|
||||
folder = [self clientObject];
|
||||
data = (NSData *)[request formValueForKey: @"calendarFile"];
|
||||
fileContent = [[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding];
|
||||
[fileContent autorelease];
|
||||
data = [request formValueForKey: @"calendarFile"];
|
||||
if ([data respondsToSelector: @selector(isEqualToString:)])
|
||||
fileContent = (NSString *) data;
|
||||
else
|
||||
{
|
||||
fileContent = [[NSString alloc] initWithData: (NSData *) data
|
||||
encoding: NSUTF8StringEncoding];
|
||||
[fileContent autorelease];
|
||||
}
|
||||
|
||||
if (fileContent && [fileContent length]
|
||||
&& [fileContent hasPrefix: @"BEGIN:"])
|
||||
|
@ -759,6 +765,8 @@ static BOOL shouldDisplayWeekend = NO;
|
|||
forKey: @"message"];
|
||||
|
||||
response = [self responseWithStatus: 200];
|
||||
[response setHeader: @"text/html"
|
||||
forKey: @"content-type"];
|
||||
[(WOResponse*)response appendContentString: [rc jsonRepresentation]];
|
||||
return response;
|
||||
}
|
||||
|
|
|
@ -690,8 +690,6 @@ function validateUploadForm () {
|
|||
return rc;
|
||||
}
|
||||
function uploadCompleted (response) {
|
||||
response = response.replace (/<pre>/, "");
|
||||
response = response.replace (/<\/pre>/, "");
|
||||
data = response.evalJSON (true);
|
||||
|
||||
var div = $("uploadResults");
|
||||
|
|
|
@ -1924,8 +1924,6 @@ function validateUploadForm () {
|
|||
return rc;
|
||||
}
|
||||
function uploadCompleted (response) {
|
||||
response = response.replace (/<pre>/, "");
|
||||
response = response.replace (/<\/pre>/, "");
|
||||
data = response.evalJSON (true);
|
||||
|
||||
var div = $("uploadResults");
|
||||
|
|
Loading…
Reference in New Issue