From a485d370c24cb6378a52c3452dc0cdbadfefd50f Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 20 Jan 2010 23:51:15 +0000 Subject: 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 --- Source/SPTableRelations.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/SPTableRelations.m') 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]]); -- cgit v1.2.3