diff options
author | rowanbeentje <rowan@beent.je> | 2010-01-20 23:51:15 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-01-20 23:51:15 +0000 |
commit | a485d370c24cb6378a52c3452dc0cdbadfefd50f (patch) | |
tree | f3bb2ded2b5571d860d7677cca509d575ec5ef81 /Source/SPTableRelations.m | |
parent | 38ed0a7356c24b2113e157fbec26004100b5f1e9 (diff) | |
download | sequelpro-a485d370c24cb6378a52c3452dc0cdbadfefd50f.tar.gz sequelpro-a485d370c24cb6378a52c3452dc0cdbadfefd50f.tar.bz2 sequelpro-a485d370c24cb6378a52c3452dc0cdbadfefd50f.zip |
Address Issue #546 (format string bugs):
- Fix incorrect uses of [NSString stringWithFormat:] with preconstructed strings and no arguments in SPUserManager
- To fix display issues, replace NSBeginAlertSheet (which includes automatic sprintf expansion of the message) with a safely-escaped SPBeginAlertSheet in many files
Diffstat (limited to 'Source/SPTableRelations.m')
-rw-r--r-- | Source/SPTableRelations.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m index 504797e2..ee72fd3a 100644 --- a/Source/SPTableRelations.m +++ b/Source/SPTableRelations.m @@ -29,6 +29,7 @@ #import "SPTableData.h" #import "SPStringAdditions.h" #import "SPConstants.h" +#import "SPAlertSheets.h" @interface SPTableRelations (PrivateAPI) @@ -135,7 +136,7 @@ // 0 indicates success if (retCode) { - NSBeginAlertSheet(NSLocalizedString(@"Error creating relation", @"error creating relation message"), + SPBeginAlertSheet(NSLocalizedString(@"Error creating relation", @"error creating relation message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], nil, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"The specified relation was unable to be created.\n\nMySQL said: %@", @"error creating relation informative message"), [connection getLastErrorMessage]]); @@ -366,7 +367,7 @@ if (![[connection getLastErrorMessage] isEqualToString:@""] ) { - NSBeginAlertSheet(NSLocalizedString(@"Unable to remove relation", @"error removing relation message"), + SPBeginAlertSheet(NSLocalizedString(@"Unable to remove relation", @"error removing relation message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], nil, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"The selected relation couldn't be removed.\n\nMySQL said: %@", @"error removing relation informative message"), [connection getLastErrorMessage]]); |