diff options
author | Stuart Connolly <stuart02@gmail.com> | 2013-12-02 23:15:12 +0000 |
---|---|---|
committer | Stuart Connolly <stuart02@gmail.com> | 2013-12-02 23:15:12 +0000 |
commit | d0bd032c159ad88e4ee341177250e56e5945700d (patch) | |
tree | c4e94dcf13966a7c55853d14a4f7ecc937842ed8 /Source/SPDatabaseDocument.m | |
parent | 617302fd14a113c896517a4993e9a992181a5fce (diff) | |
download | sequelpro-d0bd032c159ad88e4ee341177250e56e5945700d.tar.gz sequelpro-d0bd032c159ad88e4ee341177250e56e5945700d.tar.bz2 sequelpro-d0bd032c159ad88e4ee341177250e56e5945700d.zip |
More tidy up.
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index c56241ac..c4cd6ddf 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -985,12 +985,13 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase"; else { [chooseDatabaseButton selectItemAtIndex:0]; } - } + } #endif } // Add a new database else if ([contextInfo isEqualToString:@"addDatabase"]) { [addDatabaseCharsetHelper setEnabled:NO]; + if (returnCode == NSOKButton) { [self _addDatabase]; @@ -1071,9 +1072,12 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase"; SPMySQLResult *theResult = [mySQLConnection queryString:@"SELECT DATABASE()"]; [theResult setDefaultRowReturnType:SPMySQLResultRowAsArray]; if (![mySQLConnection queryErrored]) { - for (NSArray *eachRow in theResult) { + + for (NSArray *eachRow in theResult) + { dbName = NSArrayObjectAtIndex(eachRow, 0); } + if(![dbName isNSNull]) { if(![dbName isEqualToString:selectedDatabase]) { if (selectedDatabase) [selectedDatabase release], selectedDatabase = nil; |