mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
See ChangeLog
Monotone-Parent: 7cc314736d305ee7778315690bd8d1f0c506bef8 Monotone-Revision: d57d280e1a2c1d6903ab6e6d025a777f3c5e15f2 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-03-20T22:24:31 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -115,6 +115,7 @@ static NSString *uidColumnName = @"c_uid";
|
||||
if (channel)
|
||||
{
|
||||
/* generate SQL */
|
||||
defFlags.ready = YES;
|
||||
sql = [NSString stringWithFormat: (@"SELECT %@"
|
||||
@" FROM %@"
|
||||
@" WHERE %@ = '%@'"),
|
||||
@@ -164,8 +165,11 @@ static NSString *uidColumnName = @"c_uid";
|
||||
[cm releaseChannel:channel];
|
||||
}
|
||||
else
|
||||
[self errorWithFormat:@"failed to acquire channel for URL: %@",
|
||||
[self tableURL]];
|
||||
{
|
||||
defFlags.ready = NO;
|
||||
[self errorWithFormat:@"failed to acquire channel for URL: %@",
|
||||
[self tableURL]];
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -255,6 +259,7 @@ static NSString *uidColumnName = @"c_uid";
|
||||
channel = [cm acquireOpenChannelForURL: [self tableURL]];
|
||||
if (channel)
|
||||
{
|
||||
defFlags.ready = YES;
|
||||
[[channel adaptorContext] beginTransaction];
|
||||
ex = [channel evaluateExpressionX:sql];
|
||||
if (ex)
|
||||
@@ -276,8 +281,11 @@ static NSString *uidColumnName = @"c_uid";
|
||||
[cm releaseChannel: channel];
|
||||
}
|
||||
else
|
||||
[self errorWithFormat: @"failed to acquire channel for URL: %@",
|
||||
[self tableURL]];
|
||||
{
|
||||
defFlags.ready = NO;
|
||||
[self errorWithFormat: @"failed to acquire channel for URL: %@",
|
||||
[self tableURL]];
|
||||
}
|
||||
}
|
||||
else
|
||||
[self errorWithFormat: @"failed to generate SQL for storing defaults"];
|
||||
@@ -376,7 +384,7 @@ static NSString *uidColumnName = @"c_uid";
|
||||
{
|
||||
id value;
|
||||
|
||||
if (![self fetchProfile])
|
||||
if (!defFlags.ready || ![self fetchProfile])
|
||||
value = nil;
|
||||
else
|
||||
value = [values objectForKey: key];
|
||||
|
||||
Reference in New Issue
Block a user