From e3d950291ae9c74ca49f14e560bf96384a263489 Mon Sep 17 00:00:00 2001 From: mltownsend Date: Sun, 23 May 2010 06:48:25 +0000 Subject: Fix for issue#699 --- Source/SPUserManager.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Source') diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m index f666f01c..4ed2675e 100644 --- a/Source/SPUserManager.m +++ b/Source/SPUserManager.m @@ -753,8 +753,12 @@ return; } } - // Remove any selections. - [treeController removeSelectionIndexPaths:[treeController selectionIndexPaths]]; + NSSet *registeredObjects = [managedObjectContext registeredObjects]; + for (NSManagedObject *registeredObject in registeredObjects) + { + [self.managedObjectContext refreshObject:registeredObject mergeChanges:NO]; + } + [self.managedObjectContext reset]; [grantedSchemaPrivs removeAllObjects]; [grantedTableView reloadData]; @@ -1051,7 +1055,7 @@ NSMutableArray *revokePrivileges = [NSMutableArray array]; NSString *dbName = [schemaPriv valueForKey:@"db"]; - + dbName = [dbName stringByReplacingOccurrencesOfString:@"_" withString:@"\\_"]; NSString *statement = [NSString stringWithFormat:@"SELECT USER,HOST FROM `mysql`.`db` WHERE USER=%@ AND HOST=%@ AND DB=%@", [[schemaPriv valueForKeyPath:@"user.parent.user"] tickQuotedString], [[schemaPriv valueForKeyPath:@"user.host"] tickQuotedString], -- cgit v1.2.3