mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-26 16:42:44 +00:00
Monotone-Parent: 18155a2d60bff7181a5a85a593a9eeddab055e95
Monotone-Revision: 3f1a705ea4e12fea3f816fcc523a8b481c081f11 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-20T15:54:14 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2009-11-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoUserDefaults.m (_sqlJsonRepresentation:): the
|
||||
escaping of "\\" was done in the wrong direction.
|
||||
(-storeJSONProfileInDB:): we commit the transaction to avoid a
|
||||
lock on the profile table.
|
||||
|
||||
2009-11-19 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailReply.m (-messageBody): don't try to
|
||||
|
||||
@@ -262,7 +262,7 @@ static NSString *uidColumnName = @"c_uid";
|
||||
|
||||
sql = [jsonRepresentation mutableCopy];
|
||||
[sql autorelease];
|
||||
[sql replaceString: @"\\\\" withString: @"\\"];
|
||||
[sql replaceString: @"\\" withString: @"\\\\"];
|
||||
[sql replaceString: @"'" withString: @"''"];
|
||||
|
||||
return sql;
|
||||
@@ -307,6 +307,7 @@ static NSString *uidColumnName = @"c_uid";
|
||||
{
|
||||
GCSChannelManager *cm;
|
||||
EOAdaptorChannel *channel;
|
||||
EOAdaptorContext *context;
|
||||
NSException *ex;
|
||||
NSString *sql;
|
||||
BOOL rc;
|
||||
@@ -320,20 +321,22 @@ static NSString *uidColumnName = @"c_uid";
|
||||
channel = [cm acquireOpenChannelForURL: [self tableURL]];
|
||||
if (channel)
|
||||
{
|
||||
if ([[channel adaptorContext] beginTransaction])
|
||||
context = [channel adaptorContext];
|
||||
if ([context beginTransaction])
|
||||
{
|
||||
defFlags.ready = YES;
|
||||
ex = [channel evaluateExpressionX:sql];
|
||||
if (ex)
|
||||
{
|
||||
[self errorWithFormat: @"could not run SQL '%@': %@", sql, ex];
|
||||
[[channel adaptorContext] rollbackTransaction];
|
||||
[context rollbackTransaction];
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = YES;
|
||||
defFlags.modified = NO;
|
||||
defFlags.isNew = NO;
|
||||
[context commitTransaction];
|
||||
}
|
||||
[cm releaseChannel: channel];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user