Monotone-Parent: ef8822c21fe4ccf284c065db96f92ffb2750bad1

Monotone-Revision: e000b5c0e80fdd3891b4885ea6b27d82edaf8572

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-08-14T12:20:44
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2009-08-14 12:20:44 +00:00
parent 8f8e003833
commit 15a8557fc0
2 changed files with 29 additions and 26 deletions

View File

@ -1,3 +1,9 @@
2009-08-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* GCSFolder.m (-deleteAclWithSpecification:): enable the deletion
of the complete list if a nil specification is passed as
parameter, previously we would ignore such as call.
2009-06-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* GCSFolderManager.m: replaced invocations of NSLog with

View File

@ -1256,39 +1256,36 @@ static NSArray *contentFieldNames = nil;
- (void) deleteAclWithSpecification: (EOFetchSpecification *) _fs
{
EOQualifier *qualifier;
EOAdaptorChannel *channel;
NSException *error;
NSMutableString *sql;
NSString *qSql;
qualifier = [_fs qualifier];
if (qualifier)
{
sql = [NSMutableString stringWithCapacity:256];
[sql appendString:@"DELETE FROM "];
[sql appendString:[self aclTableName]];
[sql appendString:@" WHERE "];
[sql appendString:[self _sqlForQualifier:qualifier]];
sql = [NSMutableString stringWithCapacity:256];
[sql appendString:@"DELETE FROM "];
[sql appendString:[self aclTableName]];
qSql = [self _sqlForQualifier: [_fs qualifier]];
if (qSql)
[sql appendFormat:@" WHERE %@", qSql];
/* open channel */
/* open channel */
if ((channel = [self acquireAclChannel]) == nil) {
[self errorWithFormat:@"could not open acl channel!"];
return;
}
if ((channel = [self acquireAclChannel]) == nil) {
[self errorWithFormat:@"could not open acl channel!"];
return;
}
/* run SQL */
[[channel adaptorContext] beginTransaction];
if ((error = [channel evaluateExpressionX:sql]) != nil) {
[self errorWithFormat:@"%s: cannot execute acl-fetch SQL '%@': %@",
__PRETTY_FUNCTION__, sql, error];
[self releaseChannel:channel];
return;
}
[[channel adaptorContext] commitTransaction];
[self releaseChannel:channel];
}
/* run SQL */
[[channel adaptorContext] beginTransaction];
if ((error = [channel evaluateExpressionX:sql]) != nil) {
[self errorWithFormat:@"%s: cannot execute acl-fetch SQL '%@': %@",
__PRETTY_FUNCTION__, sql, error];
[self releaseChannel:channel];
return;
}
[[channel adaptorContext] commitTransaction];
[self releaseChannel:channel];
}
- (unsigned int) recordsCountByExcludingDeleted: (BOOL) excludeDeleted